SiteKit injects tag manager code
-
Hey there, New data protection act came into action here in Switzerland. We all need to put cookie blockers on every website…
I use a plugin called Real Cookie Banner in paid mode. It detects following code which is apparently injected by the SiteKitPlugin:
<!-- Google Analytics snippet added by Site Kit --> <script src='https://www.googletagmanager.com/gtag/js?id=UA-ABCDEFGHI-A' id='google_gtagjs-js' async></script> <script id="google_gtagjs-js-after"> window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);} gtag('set', 'linker', {"domains":["blueten-bijou.ch"]} ); gtag("js", new Date()); gtag("set", "developer_id.dZTNiMT", true); gtag("config", "UA-ABCDEFGHI-A", {"anonymize_ip":true}); </script>
*UA number redacted
Real Cookie Banner did not recognize the Google Tag Manager as a blockable service. It detected the injected code.
And yes, Google Tag Manager was not connected.
After fiddling with it, I managed to get the Google Tag Manager to connect correctly. Which is actually something I never wanted. I am only interested in Analytics. Nothing more! But I thought, maybe the injected code goes away and Real Cookie Banner detects the Tag Manager correctly, so I can create a content blocker using the Plugin.
Real Cookie Banner did detect the service correctly after connecting it correctly.
Unfortunately the code is still in the pages and also detected by the Real Cookie Banner.
Could it be that the code injection is coming form an older version of Site Kit? Could it be, I did search, believe me, that I injected the code somewhere? But why would I add “Site Kit” in the comment??
Anyways, I have tis on all my sites. And so far the resolution was to completely disconnect and delete the analytics account. Which I would like to omit in the future and resolve this now and for ever ??
Thanks for consideration & Cheers
-Alex
The page I need help with: [log in to see the link]
- The topic ‘SiteKit injects tag manager code’ is closed to new replies.