How to anonymize Google Analytics?


(Timon) #1

Hello,

we need to anonymize IPs in Germany for using Google Analytics. How I can activate this in admin settings?

For GA universal code:

ga('create', 'UA-XXXXXXX-X', 'website.de'); ga('set', 'anonymizeIp', true); ga('send', 'pageview');

For classic GA code:

_gaq.push(['_setAccount', 'UA-XXXXXXX-X']); _gaq.push(['_gat._anonymizeIp']); _gaq.push(['_trackPageview']);

Best regards


(Jeff Atwood) #2

Paste in whatever custom Analytics JavaScript you need in Admin, Customize, HTML. Do not enable the included Analytics settings if you do that as it will conflict.


(Sam Saffron) #3

A tiny bit trickier, you need to follow this pattern:

Notice the PageTracker stuff