I use react-gtm-module to place the Google Tag Manager Tags in a react/next.js app hosted with netlify.
The gtm script tag in the head renders perfectly. But the noscript tag in the body is rendered falsely with the iframe as string:
<body>
<noscript>
"
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX>m_auth=>m_preview=>m_cookies_win=x"
height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>"
</noscript>
...
</body>
react-gtm-module code:
import TagManager from 'react-gtm-module'
...
componentDidMount(){
const tagManagerArgs = { gtmId: 'GTM-NCGQVKQ' }
TagManager.initialize(tagManagerArgs);
}
Has anybody an idea what might be the cause?
Thanks a lot!