Good morning. I am trying to install the script for Google Tag Manager as per their instructions into the Master Page for my Robohelp Version 2020.8.34 project. As per attachment, I'm getting an "Invalid character =" error. Would appreciate any assistance.
easiest thing to do is make it a separate js file and call it in the master page as script. Eliminates fighting with adobe's editor. That is what I do for analytics and tag manager on my site. For the analytics tracking code update the async line to async="". Calling it in as a separate script is much easier. Plus, if you are using a staging server to test before pushing to production, tag manager and analytics won't capture the test data as you just have to switch out the js files.
If I click to Autofix, it appears as below, but still doesn't work: <!-- Google Tag Manager --> <script> //<![CDATA[ (function(w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src= 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-XXXXXXX'); //]]> </script> <!-- End Google Tag Manager --> </head> <body> <!-- Google Tag Manager (noscript) --><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><!-- End Google Tag Manager (noscript) --> <div data-region="header">