☯☼☯ SEO and Non-SEO (Science-Education-Omnilogy) Forum ☯☼☯
SEO => SEO => Topic started by: Agalya on November 08, 2017, 05:21:32 PM
-
How can I implement "Google Tag Manager" to my website?
-
Google Tag Manager overview
Google Tag Manager overview: https://support.google.com/tagmanager/answer/6102821?hl=en.
Was this article helpful?
-
Go to tagmanager.google.com to create an account (or to access an existing account).
-> Create a container for your site in the account.
-> Add the container snippet to your site.
-> Migrate any hardcoded tags (such as AdWords or DoubleClick tags) from your site's source code into Tag Manager.
-
-> Duplicate the accompanying JavaScript and glue it as near the opening <head> tag as conceivable on each page of your site, supplanting GTM-XXXX with your compartment 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 accompanying bit and glue it quickly after the opening <body> tag on each page of your site, supplanting GTM-XXXX with your compartment 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) -->