Can I still anonymize IPs or disable cookies in GA4 the way Universal Analytics allowed?
Quick answer
GA4 anonymizes IP addresses by default, for every hit, with no equivalent of Universal Analytics' anonymizeIp flag needed or available - IP truncation is built into how GA4 collects data, not an optional setting. There is also no direct 'disable cookies' toggle; instead, GA4 respects Consent Mode signals and, when a visitor declines analytics consent, can fall back to cookieless pings and modeled (rather than cookie-based) measurement.
Why This Happens
Universal Analytics processed the full IP address briefly for geolocation before optionally truncating it, controlled by a setting site owners had to explicitly enable. GA4 was redesigned around not retaining full IP addresses as a design default across all regions, reflecting both stricter privacy expectations and the shift toward Google's own Consent Mode framework as the primary lever for privacy-related tracking behavior.
Because of this, questions like 'how do I anonymize IP in GA4' and 'how do I disable cookies in GA4' are really asking about a Universal Analytics-era control surface that GA4 replaced with a different mechanism entirely: Consent Mode, which tells GA4 (and Google Ads) what a visitor has and hasn't consented to, and lets GA4 decide internally how to collect (or model) data in response - rather than a site owner flipping individual cookie/IP switches.
Fix It
Stop looking for an IP-anonymization setting - it's not needed
There is nothing to configure for IP anonymization specifically; GA4 truncates IPs before storage by default across the entire product, so no code change or admin setting achieves anything beyond what already happens automatically.
Implement Consent Mode v2 for actual consent-based control
Add the gtag('consent', 'default', {...}) call before your GA4 config, setting analytics_storage, ad_storage, ad_user_data, and ad_personalization based on your consent banner's default state, then call gtag('consent', 'update', {...}) when the visitor makes a choice.
Use a Consent Management Platform if you operate under GDPR/CCPA
A CMP that's Consent Mode v2-compatible (rather than a custom-built banner) reduces the risk of miswiring the consent signals, since GA4's cookieless-ping and modeling behavior depends on receiving the right consent state at the right time.
If you need to suppress GA4 entirely for specific users or regions, use a kill switch, not a cookie toggle
For a hard requirement to not collect any data at all for certain visitors, gate the entire gtag.js/GTM load behind your own logic (e.g. a consent-gate check before the snippet loads) rather than looking for a GA4-native 'disable cookies' setting that doesn't exist.
How To Verify It Worked
In GA4 DebugView, trigger an event with consent set to denied via your Consent Mode implementation, and confirm the request in the Network tab hits the cookieless ping endpoint pattern rather than setting a full _ga cookie - this is the observable proof that consent state is actually reaching GA4.
Cross-check in GA4 Admin > Data Settings > Data Collection that 'Google signals data collection' status matches what you expect given your consent setup, since Google signals depends on consent being granted for ad personalization signals specifically, separate from basic analytics consent.
Still Not Fixed?
We audit and fix GA4 implementations for a living - if this doesn't resolve it, the next step is usually a full event-by-event audit.
Talk to a GA4 Consultant