Web Development

GDPR: How to enable the IP Anonymization feature in Google Analytics?

HIDE YOUR IP

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>
Source: https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization

Subscribe to our Newsletter

Stay tuned for the latest Internet & Technology news, how-to guides and exclusive offers!

  • Was this Helpful ?
  • Yes No

    0 people out of 0 found it useful.

Author

Vision4Reality

Web Hosting, Web Design, Domain Register & SSL Certificates. Promotion - Advertise. Digital Photography and Video, Green Screen, Animation. Art, Glamour, Portrait Photography.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.