GA4 Consent Mode V2: Complete Setup Guide for 2026
How to implement Google Consent Mode V2 for GDPR and CCPA compliance. Step-by-step guide with code examples for GTM and gtag.js.
Google Consent Mode V2 is now mandatory for advertisers in the EEA. Without it, you lose access to Google Ads remarketing audiences and conversion modeling. Here's how to set it up correctly.
What Is Consent Mode V2?
Consent Mode is a Google API that adjusts how Google tags behave based on user consent. When a user hasn't consented, tags still fire but in a restricted "cookieless" mode — no cookies are set, but Google can still model conversions.
V2 adds two new parameters:
- `ad_user_data` — Consent for sending user data to Google for advertising
- `ad_personalization` — Consent for personalized advertising
Implementation Methods
Method 1: gtag.js (Direct)
Add this BEFORE your GA4 tag:
// Set defaults BEFORE gtag config gtag('consent', 'default', { 'analytics_storage': 'denied', 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'wait_for_update': 500 });javascript
When the user accepts cookies:
gtag('consent', 'update', { 'analytics_storage': 'granted', 'ad_storage': 'granted', 'ad_user_data': 'granted', 'ad_personalization': 'granted' });javascript
Method 2: GTM (Recommended)
- Create a Consent Initialization trigger (fires before All Pages)
- Add a Custom HTML tag with the consent defaults
- Create a trigger that fires when the user accepts
- Add another tag that updates consent on accept
CMP Integration
Most Consent Management Platforms (Cookiebot, OneTrust, CookieYes) have built-in Consent Mode V2 support. Enable it in your CMP dashboard — they handle the gtag('consent', 'update') call automatically.
Testing Consent Mode
- Open Chrome DevTools → Network tab
- Filter by `collect` to see GA4 hits
- Check the `gcs` parameter in the collect URL:
- - `gcs=G100` = both denied
- - `gcs=G111` = both granted
Also check in GA4 DebugView — events collected in consent-denied mode show a shield icon.
Impact on Data
With Consent Mode active, expect: - 10-30% less directly attributed conversions (cookieless visitors) - Behavioral modeling recovers most of this data - Full compliance with GDPR, DMA, and CCPA
The trade-off is worth it. Non-compliance risks fines up to 4% of global revenue.
Check if your site has Consent Mode properly configured — run a free audit →
Check your GA4 implementation
Run a free AI-powered audit to see how your tracking stacks up.
Start Free Audit