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 analytics 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.

So you add the above code to your website and now what? What happened? Let us verify 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:


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: &aip=1&a=724597636&t=pageview&_s=1&!&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!