Google Analytics with Consent not working
-
Hello,
thanks for your great plugin!
Since the update from version 2.8.9 to the newest version I have a problem with the Google Analytics code.
I use a consent which allows tracking with Google Analytics only if the visitor has agreed to it, for this reason my code looks like this:<!-- Global site tag (gtag.js) - Google Analytics --> <script async class="cmplazyload" data-cmp-vendor="s26" data-cmp-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"> </script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXX', { 'anonymize_ip': true }); </script>
Once I enable JS processing in FVM, the plugin does the following code on it:
<script> window.dataLayer=window.dataLayer|[];function gtag(){dataLayer.push(arguments)} gtag('js',new Date());gtag('config','G-XXXXXXX',{'anonymize_ip':!0}) </script>
so it deletes the top line. When I remove the data-cmp-
<!-- Global site tag (gtag.js) - Google Analytics --> <script async class="cmplazyload" data-cmp-vendor="s26" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"> </script>
GA works again, but this is critical from a data protection point of view. Is there a setting here that prevents FVM from deleting the line? I have tried all the checkbox combinations in JS processing so far.
Thank you.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Google Analytics with Consent not working’ is closed to new replies.