I'm trying to create Google Tag Manager snippets. Unfortunately, after creating this I can see message on top of the page:
class="home page-template-default page page-id-283 logged-in admin-bar no-customize-support wp-custom-logo right-sidebar">
this is standart google snippet:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Google tells that it should be inserted "immediately after the opening <body> tag on every page of your website, replacing GTM-XXXX with your container ID"
So my option on Woody is "automatic insertion" and "insert before post". This is wrong?
The snippet code that you sent initially will not work. The problem is probably something else. Do you have other snippets? Try turning them off one at a time and checking
Yes, there are two snippets, one in head, one in body:
"To implement Google Tag Manager on your website:
Copy the following JavaScript and paste it as close to the opening <head> tag as possible on every page of your website, replacing GTM-XXXX with your container ID:
<!-- Google Tag Manager -->
<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=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->
Copy the following snippet and paste it immediately after the opening <body> tag on every page of your website, replacing GTM-XXXX with your container ID:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->"
The first snipped I've inserted to location "head" to "entire website". Error message was after the second snippet. Now I've changed the location option of the second snippet from "insert before post" to "insert before content" and everythings seems OK now, without error messages. But if you say that this code initially will not work, now I don't know if it works to Google...