-
AuthorPosts
-
June 5, 2015 at 10:21 pm #455326
Hi Team,
in order to comply with EU/Italian privacy and cookies policy, I would like to assure IP anonymization in Google Analytics in my blog.
Is it possible to insert some code to Enfold theme option –> GA tracking code?
Something like this:
ga(‘set’, ‘anonymizeIp’, true)Thanks!
June 6, 2015 at 12:48 pm #455465Hi turistai!
Thank you for using Enfold.
You need to place it directly in your ga analytics code. Refer to this link for more info: http://www.iubenda.com/blog/2013/11/13/ip-anonymization-google-analytics-privacy/#gajs
The ga snippet should look something like this:
<!-- Google Analytics --> <script async src='//www.google-analytics.com/analytics.js'></script> <script> window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', 'UA-XXXX-Y', 'auto'); ga('set', 'anonymizeIP', true); // anonymize ip address ga('send', 'pageview'); </script> <!-- End Google Analytics -->
Cheers!
IsmaelJune 6, 2015 at 11:58 pm #455546Hello Ismael,
thanks I will try it.
Regards!June 7, 2015 at 8:11 am #455594Hey!
Ok. Let us know if it works. You might see the result after a few days. I’m really not sure how they test if this is working though.
Cheers!
IsmaelMay 10, 2018 at 12:05 pm #954484I found this when I was doing research for GDPR. For those using the newer gtag.js, here is the code:
<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID”></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());gtag(‘config’, ‘GA_TRACKING_ID’, { ‘anonymize_ip’: true });
</script>May 10, 2018 at 12:08 pm #954487Here is more info on that: https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization
May 11, 2018 at 6:05 am #955014May 22, 2018 at 8:39 pm #960504How do I do this when using a child theme?
May 23, 2018 at 2:40 pm #960819gooflo, check out your theme settings page and look for “Google Services” tab. There is a Google Analytics tracking code tab.
May 24, 2018 at 10:30 am #961409Hi there,
Where do I have to put that script? In the field in the tab Google-Services I filled in the Google Analytics Tracking Code. Do I have to place the script after that code?
Greetings Marcel
May 24, 2018 at 10:44 am #961416Hi Marcel,
Yes, you just need to put the script in the Google Analytics Tracking Code textarea.
Hope this helps.Best regards,
NikkoMay 24, 2018 at 11:15 am #961435Marcel, simply copy the whole script but don’t forget to replace GA_TRACKING_ID by your own tracking ID (at 2 places in the script)
May 24, 2018 at 12:53 pm #961505Thanks a lot!
Best Regards, Marcel
May 24, 2018 at 3:44 pm #961589Hi Marcel,
Glad that we could help. :)
Thanks for using Enfold and have a great day!Best regards,
NikkoMay 25, 2018 at 5:30 pm #962282Very helpful.
Thanks!Mark
-
AuthorPosts
- You must be logged in to reply to this topic.