How to check if IP anonymization/masking is enabled for Google analytics

I previously made a post on how to disable cookies for Google analytics. In the same post I mentioned that I had used Google analytic's IP anonymization. You can enable IP anonymization by adding the following line of code to your google analytics javascript code:

ga('create', 'UA-69002404-2');
ga('set', 'anonymizeIp', true); //This line right here.

So you add the above code to your website and now what? What happened? Let us very that it actually did something. For this you should head to your developer console (F12) in your browser. Open up the network tab (perhaps refresh the page) and look for the "collect" request made by Google analytics:

Google-analytics-anonymize-ip-parameter-set-aip-check

So we found the collect request, what are we looking for next? What you should look for in the URL is the parameter aip. It should hold the value one as in &aip=1. If you see this parameter with the value "1", you have successfully anonymized the IP addresses of your users. The below is the same request made in the image above, where i have made the &aip=1 part in bold:

https://www.google-analytics.com/collect?v=1&_v=j85 &aip=1&a=724597636&t=pageview&_s=1&dl=https%3A%2F%2Fpeterdaugaardrasmussen.com%2F2020%2F09%2F05%2Fnew-cookie-policy-page%2F&ul=en-us&de=UTF-8&dt=I%20now%20have%20a%20cookie%20policy%20page%20for%20my%20blog!&sd=24-bit&sr=1920x1080&vp=1903x538&je=0&_u=YEAAAAAB~&cid=2101380632.1599507182&tid=UA-69002404-2&_gid=337833065.1599507182&z=65170217

The anonymization happens on the Google servers, as the first thing within the "Analytics Collection Network". Except for checking the parameter is set on the request there is nothing you can do to verify this, the rest is up to Google.

I hope this helps you verify your IP anonymization! Please let me know in the comments if it did!