Currently i am using the package React-gtm-module, and i do not want to use unsafe-inline in CSP.so is there a way to add nonce to google tag manager in reactjs?
my current code:
import React from 'react'
import ReactDOM from 'react-dom'
import Router from 'react-router'
import routes from './routes'
...
import TagManager from 'react-gtm-module'
const tagManagerArgs = {
gtmId: 'GTM-000000'
}
TagManager.initialize(tagManagerArgs)
...
const app = document.getElementById('app')
ReactDOM.render(<Router routes={routes} />, app)