GA4 IP anonymization: when and how to go beyond defaults

Written by

Uliana Lesiv

Updated Sep 8, 2026 comments

Key takeaways

How GA4 handles IP address anonymization by default

IP anonymization
GA4 IP anonymization and Consent Mode v2

The limitation of GA4 IP address anonymization

The limitation of GA4 IP address anonymization

When is GA4's default IP anonymization not enough?

Note:

How to replace the original IP address before sending data to GA4

Before you begin

Hint:

Step 1. Enable Stape's GEO header power-up

Enable Stape's GEO header power-up

Step 2. Create a variable to determine which IP should be sent to GA4

Advanced Lookup Table
Advanced Lookup Table
GCS parameter variable
X-Real-IP value
X-Real-IP value
X-Real-IP value
Advanced Lookup Table
variable
configured Advanced Lookup Table variable

Step 3. Pass the anonymized IP to Google Analytics 4

Pass the anonymized IP to Google Analytics 4

How to verify GA4 IP anonymization is working properly

Stape GTM Helper
The request data
Preview
Outgoing HTTP Requests from Server
parameter _uip
_uip

FAQ

Want to start on the server side?

Try for free

Written by

Uliana Lesiv

Content writer

Uliana is a Content Manager at Stape, specializing in analytics and integration setups. She breaks down complex tracking concepts into clear insights, helping businesses optimize data collection.

Was this article helpful?

Comments

Recommended for you

Turn better tracking into better marketing performance

Try for free