My company uses Google Tag Manager to control a number of sites. I am wondering if it might be possible to use my Google Tag Manager account instead of just Analytics.
The tag format is slightly different. The instructions say:
I could replace the Analytics code with the above, but then it also asks for:
Where XXX-XXXXXX is the GTM account number.
Is this possible?
The tag format is slightly different. The instructions say:
Paste this code as high in the <head> of the page as possible:
Code:
<!-- 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','XXX-XXXXXX');</script> <!-- End Google Tag Manager -->
Additionally, paste this code immediately after the opening <body> tag:
Code:
<!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=XXX-XXXXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) -->
Is this possible?
Comment