Shahin

IP Anonymization

Intermediate
Updated Jul 11, 2026 Shahin editorial 2 min read
PronunciationEN/ˌaɪ ˈpiː əˌnɑːnɪməˈzeɪʃən/

IP anonymization is discarding or zeroing part of a visitor's IP address before it is stored, so the stored record no longer points to one specific connection.

The usual form zeroes the last octet of an IPv4 address and the last 80 bits of an IPv6 address, so 203.0.113.45 is stored as 203.0.113.0. Country and usually region survive that truncation, while city and carrier resolution degrade. Masking is not the same as full anonymization: a truncated address next to a user agent string and a behaviour pattern can still narrow the field, which is why truncation is generally treated as risk reduction rather than a clean exit from personal data. In the previous generation of Google Analytics this was an option called anonymizeIp, while in GA4 masking applies to all traffic by default and has no on-off switch.

FAQ

Sources:Google Analytics Help — IP masking