Google Consent Mode for GA4

Google Analytics 4 relies on Consent Mode to collect data compliantly. UniConsent ensures GA4 respects user consent while maintaining measurement coverage through conversion modeling.

IAB registered consent manager for GDPRIAB TCF V2 registered consent manager for GDPRIAB TCF Canada registered consent managerGoogle-certified CMPGoogle-certified CMP
Trusted by 5000+ of global publishers and marketers
  • sej
  • football365
  • sharethrough
  • districtm
  • pf1
  • tower cast

Google Consent Mode for GA4

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.

How Consent Mode Affects GA4

When analytics_storage is granted, GA4 works as usual: it sets cookies, tracks sessions, and reports on user behavior.

When analytics_storage is denied:

  • GA4 does not set analytics cookies (_ga, ga*)
  • Cookieless pings are sent to Google with basic event information
  • Page views, events, and conversions are recorded without user-level identification
  • Google uses these pings for behavioral and conversion modeling
  • Modeled data fills gaps in your reports

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.

UniConsent and GA4

  • Certified by Google and IAB TCF for Consent Mode integration
  • Supports both Basic and Advanced Consent Mode for GA4
  • Advanced Consent Mode enables behavioral and conversion modeling in GA4
  • Compatible with GA4 on websites and mobile apps
  • Works with Google tag (gtag.js) or Google Tag Manager
  • Region-specific consent defaults applied automatically
  • Compatible with Google Tag Gateway for first-party tag serving

GA4 Tag Diagnostics

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.

How to Get Started

  1. Sign up for UniConsent and obtain your license ID
  2. Choose Advanced Consent Mode for maximum measurement coverage
  3. Install the UniConsent CMP tag before your GA4 tag
  4. Verify with the Consent Mode Scanner that consent signals are reaching your GA4 tag
  5. Check GA4 Tag Diagnostics (Admin > Consent settings) to confirm everything is working

For detailed setup, see our Google Consent Mode tutorial and gtag.js integration guide.

GA4 and Google Tag Gateway

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.

GA4 and Server-Side GTM

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.

Frequently Asked Questions

Is Google Consent Mode required for GA4?

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.

What happens to GA4 when analytics_storage is denied?

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.

What is the difference between Basic and Advanced Consent Mode for GA4?

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.

How does GA4 conversion modeling work?

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.

How do I check if Consent Mode is working with GA4?

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.

Does GA4 work with Google Tag Gateway?

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.

Does GA4 work with server-side GTM?

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.

Which GA4 cookies are affected by Consent Mode?

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.

IAB registered consent manager for GDPRIAB TCF V2 registered consent manager for GDPRIAB TCF Canada registered consent managerGoogle-certified CMPGoogle-certified CMP
Trusted by 5000+ of global publishers and marketers
  • sej
  • football365
  • sharethrough
  • districtm
  • pf1
  • tower cast

Get started to make your website and application compliant for EU GDPR, US CPRA, CA PIPEDA etc

Sign up