How to enable IP Anonymization in Google Analytics
Now with the GDPR is better to anonymize (hide) the IP of your website visitors.
Here’s an easy way in case you use the newer gtag.js from Google Analytics in your website.
Add after Google Analytics ID:
{ 'anonymize_ip': true }
So the script will look like this:
<!-- 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>
Web Hosting, Web Design, Domain Register & SSL Certificates.
Promotion - Advertise. Digital Photography and Video, Green Screen, Animation. Art, Glamour, Portrait Photography.