Set Up Google Consent Mode v2
Time: 20 minutes Requires: ConsentForge installed, Google Tag Manager
Google Consent Mode v2 is required for Google Ads conversion modeling and GA4 behavioral modeling in the EU from March 2024.
Step 1: Set consent defaults
Add this snippet before your GTM container tag and before ConsentForge:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'analytics_storage': 'denied',
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'wait_for_update': 500
});
</script>
Step 2: Install ConsentForge via GTM template
- In GTM, go to Templates → Search Gallery → ConsentForge
- Add the template, create a new tag, set trigger: Consent Initialization - All Pages
- Enter your embed token
Step 3: Configure GA4 and Ads tags for consent
For each GA4 or Google Ads tag:
- Open the tag → Advanced Settings → Consent Settings
- Set:
analytics_storagefor GA4,ad_storage+ad_user_datafor Ads
Step 4: Verify
- Open GTM Preview mode and visit your site
- Deny consent — confirm GA4 tag fires in "modeling mode"
- Accept consent — confirm GA4 fires normally
- In DevTools Console:
window.dataLayer.filter(e => e[0] === 'consent')— should show default + update
See also: Google Consent Mode v2 docs