Bunnies are going to Broadcast Asia in Singapore! 🐰 - Let's dive into your future success with bunny.net🚀

Book a Meeting

What is IP anonymization (masking)?

An overview of IP anonymization in Google Analytics

IP anonymization

General overview of how we can achieve IP anonymization or IP masking in Google Analytics.

What is IP anonymization/masking?

Internet Protocol (IP) address anonymization or masking is simply sending a visitor's IP address to Google Analytics servers by deleting/masking the last octet of the IPv4 address or the last 80 bits of the IPv6 address.

IP anonymization

IP address anonymization occurs before any visitor's data is stored or processed by the Google servers. For the newest version of Google Analytics 4, the IP address anonymization is enabled by default and no manual action is required. For older versions, IP address anonymization is an opt-in feature that needs to be explicitly by adding a parameter to your tracking code.

How can we enable IP anonymization in Google Analytics?

The process of IP address anonymization takes place within two steps in the collection pipeline: the JavaScript Tag and Collection network:

IP anonymization in Google Analytics

IP address anonymization with analytics.js:

ga('set', 'anonymizeIp', true);

IP address anonymization with gtag.js:

gtag('config', '<GA_MEASUREMENT_ID>', { 'anonymize_ip': true });

IP anonymization can also be set up through Google Tag Manager (GTM) graphical settings interface.

IP anonymization for iOS is done automatically with the use of Firebase SDK or with the following line when using iOS SDK:

[tracker set:kGAIAnonymizeIp value:@"1"];

IP anonymization for Android is done with Google Analytics Services SDK for Android with the following configuration parameter:

<string name="ga_anonymizeIp">true</string>

Did you find this article helpful?

0 out of 0 Bunnies found this article helpful



Hypertext Transfer Protocol. A protocol that connects web browsers to web servers when they request content.

Layer 3

The layer of the OSI model that handles communication over networks.

IP Address

A unique location on the internet represented by an alphanumeric address. The two current standards are IPv4 and IPv6.

Prove your Knowledge.
Earn a bunny diploma.

Test your knowledge in our Junior and Master Quizes to see where you stand. Prove your mastery by getting A+ and recieving a diploma.

Start the QuizBunny with a diploma.