Using Google Tag Manager and having analytics.js
-
Hi,
I transitioned to Google Tag Manager and want to use Site Kit to insert the code but it seems there is still some analytics.js and gtag methods in the code of my website coming from the site kit plugin.
When I check the source code I only see the google tag manager component.
However, when I inspect my website in chrome I still have analytics.js (https://www.googletagmanager.com/gtag/js) and a gtag script (https://www.googletagmanager.com/gtag/js?id=G-XXXX&l=dataLayer&cx=c”).
Yet, I already have a script with /gtm.js?id=GTM-XXXXXXThe Site Kit plugin inserts the Tag Manager Code Snippet.
The Universal Analytics Code Snippet is well identified as controlled by the Tag Manager module and ‘Place Universal Analytics code’ is off. Google Analytics 4 Code Snippet is not inserted either.
When I deactivate site Kit, all disappear, analytics.js, gtag and gtm in the inspect window.
Which tells me I don’t have gtag hard coded in the website anywhere.The datalayer parameter in gtag seems to come from GTM but I’m not sure why.
In GTM:
I have a web container with a UA variable, a tag for UA and a tag for GA4.
(I also have an AMP container with an UA AMP tag and an AMP linker tag)In Analytics,
GA4 is associated with UA
UA is associated with GA4In https://tagassistant.google.com/
I see the GTM container with the UA and GA4 tags firing. But I also see the GA4 tag separately, which seems consistent with the issue I see when I inspect the page.Could you please let me know if it’s normal that analytics.js and gtag are included in the code? Is it an issue from Site Kit or is my configuration wrong?
Thanks a lot.
Best,The page I need help with: [log in to see the link]
The topic ‘Using Google Tag Manager and having analytics.js’ is closed to new replies.