GTAG script is loading even when GTM is disabled
-
Hi,
I have Google Analytics (GA4) enabled without Google Tag Manager (GTM).However, even though GTM is completely disabled in the plugin settings, I still see this data layer in the HTML:
<!-- Google Tag Manager by PYS -->
<script data-cfasync="false" data-pagespeed-no-defer>
window.dataLayerPYS = window.dataLayerPYS || [];
</script>
<!-- End Google Tag Manager by PYS -->I assume this is expected and used internally by the plugin, which is fine.
But I also see that the plugin tries to load this script:
https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX&l=dataLayerPYS
And in the browser console I get this error:Loading the script from “https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX&l=dataLayerPYS” failed.
Why is this GTAG script being loaded with the custom dataLayerPYS, even though GTM is disabled?
It looks like something that should only happen if GTM is enabled.Thanks in advance for your help.
The topic ‘GTAG script is loading even when GTM is disabled’ is closed to new replies.