Google Analytics 4 relies on Consent Mode to collect data compliantly. UniConsent ensures GA4 respects user consent while maintaining measurement coverage through conversion modeling.
Google Analytics 4 relies on Consent Mode to collect data compliantly under GDPR, CCPA, and other privacy regulations. When Consent Mode is active and a user denies analytics_storage, GA4 does not set analytics cookies. Instead, it sends cookieless pings that provide basic measurement data without identifying the user.
Google uses these cookieless pings to model the visits and conversions that would have been observed if consent had been granted. This modeled data appears in your GA4 reports alongside observed data, giving you a more complete picture of site performance even when a portion of users decline consent.
Without Consent Mode, GA4 either fires normally without respecting consent (a compliance risk) or is blocked entirely by the CMP (losing all measurement for non-consented users). UniConsent's integration ensures GA4 respects user consent while maintaining as much measurement as possible through modeling.
Since March 2024, Google requires Consent Mode for measurement features when targeting users in the EEA, UK, and Switzerland.
When analytics_storage is granted, GA4 works as usual: it sets cookies, tracks sessions, and reports on user behavior.
When analytics_storage is denied:
When ad_storage or ad_user_data is also denied, GA4 does not collect data for advertising features like remarketing audiences or demographic reports.
Advanced Consent Mode is required for GA4 modeling to work. With Basic Consent Mode, GA4 is blocked entirely when consent is denied and no pings are sent.
Google Analytics recently launched the Tag Diagnostics feature to help check whether Google Tags are installed and consent configurations are set up correctly. You can find this feature by navigating to Admin > Property settings > Data collection and modifications > Consent settings in your GA4 property.
If Tag Diagnostics flags missing consent signals, see our consent signals for Google Analytics guide for troubleshooting steps.
For detailed setup, see our Google Consent Mode tutorial and gtag.js integration guide.
If you use Google Tag Gateway to serve your GA4 tag from a first-party domain, UniConsent's Advanced Consent Mode ensures consent defaults are set before the GTG-served tag fires. See our Google Tag Gateway tutorial for setup details.
If you use server-side GTM, UniConsent passes consent state to the client-side container, which forwards it to the server-side container. GA4 events are only processed and forwarded when analytics_storage consent has been granted.
Since March 2024, Google requires Consent Mode for measurement features when targeting users in the EEA, UK, and Switzerland. Without it, GA4 cannot collect data compliantly for users in these regions.
GA4 does not set analytics cookies. Instead, it sends cookieless pings with basic event information. Google uses these pings for behavioral and conversion modeling, which fills gaps in your reports. Advanced Consent Mode is required for this to work.
Basic Consent Mode blocks GA4 entirely when consent is denied, so no data is collected. Advanced Consent Mode sends cookieless pings that feed modeling, recovering measurement data for non-consented users while still respecting their choice.
When consent is denied, GA4 sends cookieless pings with basic event data. Google uses these pings along with machine learning to estimate the visits and conversions that would have been observed with consent. The modeled data appears in your GA4 reports alongside observed data.
In GA4, navigate to Admin > Property settings > Data collection and modifications > Consent settings to check Tag Diagnostics. You can also use the UniConsent Consent Mode Scanner to verify consent signals are reaching your GA4 tag.
Yes. If you use Google Tag Gateway to serve your GA4 tag from a first-party domain, UniConsent Advanced Consent Mode ensures consent defaults are set before the GTG-served tag fires.
Yes. UniConsent passes consent state to the client-side GTM container, which forwards it to the server-side container. GA4 events are only processed when analytics_storage consent has been granted.
When analytics_storage is denied, GA4 does not set _ga or _ga_* cookies. When ad_storage is denied, advertising-related cookies are also blocked. When consent is granted, cookies are set as usual.
Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc
Sign up