Google Analytics Script Code Changed by Plugin
-
Greetings developers,
first of all thank you for this great plugin.
When inserting our google analytics code block to the script blocking section..
<!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-116736819-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-116736819-1'); </script>
The plugin automatically changes it to:
<!-- Global site tag (gtag.js) - Google Analytics --> <a href="https://www.googletagmanager.com/gtag/js?id=UA-116736819-1">https://www.googletagmanager.com/gtag/js?id=UA-116736819-1</a> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());
And thereby replaces the first script tag with an a href. I guess this is the reason why no events are fired to Google Analytics, can this be the case?
What am I missing here? Thank you for your help.
//Tim
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Google Analytics Script Code Changed by Plugin’ is closed to new replies.