Summary
Google Consent Mode v2 is required for EU advertisers using Google Ads and Analytics starting March 2024. This playbook walks you through implementation with your existing CMP.
Prerequisites Checklist
- Google tag (gtag.js) or GTM installed
- CMP displaying consent banner
- Access to edit website code or GTM
- Test environment available
Decision Tree
Do you use Google Tag Manager?
├── YES → Use GTM Consent Mode template
│ └── Does your CMP have GTM integration?
│ ├── YES → Use CMP's GTM template
│ └── NO → Use manual dataLayer implementation
└── NO → Implement directly in gtag.js
└── Does your CMP support Consent Mode?
├── YES → Enable in CMP settings
└── NO → Implement custom JavaScript bridge
Implementation Steps
Step 1: Set Default Consent State
Add this code before any Google tags load:
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500,
'region': ['EU', 'EEA', 'GB']
});
Time estimate: 5-10 minutes
Step 2: Configure Consent Updates
When user grants consent, update the state:
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted'
});
Time estimate: 10-20 minutes
Step 3: Connect Your CMP
For Cookiebot:
- Go to Cookiebot dashboard → Settings → Google Consent Mode
- Enable “Google Consent Mode v2”
- Map consent categories to Google consent types
- Save and republish
For Usercentrics:
- Go to Admin Interface → Implementation
- Enable “Google Consent Mode”
- Configure consent type mappings
- Deploy updated script
Time estimate: 10-15 minutes
Step 4: Enable Advanced Features (Optional)
gtag('set', 'url_passthrough', true);
gtag('set', 'ads_data_redaction', true);
Time estimate: 5 minutes
Step 5: Verify Implementation
- Open Chrome DevTools → Console
- Type:
dataLayer.filter(e => e[0] === 'consent') - Verify default and update events appear
- Use Google Tag Assistant to validate
Time estimate: 10-15 minutes
Failure Modes
Consent Mode not firing
Symptom: No consent events in dataLayer
Cause: Script loading order issue
Fix: Ensure consent default is set before gtag loads. Use async loading for gtag but sync for consent default.
CMP not updating consent
Symptom: Default state never changes to granted
Cause: CMP callback not connected
Fix: Check CMP documentation for consent callback. Verify event listener is properly configured.
Region detection not working
Symptom: All users see consent banner (or none do)
Cause: Geo-detection misconfigured
Fix: Verify CMP geo-detection settings. Consider using server-side detection for accuracy.
Downloadable Resources
Related Playbooks
Sources
Disclosure: We may earn a commission if you sign up for recommended tools through our links. This never affects our recommendations or methodology.