Consent Mode v2 with GTM (WordPress)
Deploy Consent Mode using GTM in 10 minutes
Consent Mode v2 with GTM (WordPress)
Use this guide if you’re deploying Google Consent Mode v2 using Google Tag Manager (GTM) in a WordPress site. If you’re using ConsentPress, most of the heavy lifting is already done for you — but it’s still important to set up GTM correctly.
1. Enable Consent Mode in Your GTM Container
Consent Mode is not active by default in GTM. You must enable it in your container settings.
- Go to Admin → Container Settings inside GTM
- Enable Consent Overview and Additional Consent Checks
- Click Save
2. Set Default Consent in GTM (Optional)
If you’re using ConsentPress, you don’t need to add a Consent Initialization tag — the plugin injects it automatically at the right time. But if you’re not using a CMP that handles this:
- Create a new GTM tag: Tag → Consent Initialization → Google Consent Mode
- Set default consent values (e.g.
analytics_storage: denied) - Trigger: Consent Initialization – All Pages
3. Add Consent Requirements to Each Tag
Every GTM tag that sets cookies or tracks users must declare which types of consent it depends on.
- GA4: Require
analytics_storage - Google Ads: Require
ad_storage,ad_user_data,ad_personalization - Meta Pixel: Require
ad_storage
To configure this in each tag:
- Open the tag in GTM
- Go to Tag Settings → Consent Settings
- Enable “Require additional consent”
- Specify the needed keys as listed above
4. CMP → Consent Mode Signals
Your CMP must send consent updates to Google using gtag('consent', 'update', …) when the user accepts or rejects.
ConsentPress handles this automatically. Here’s what the update call might look like:
gtag('consent', 'update', {
ad_storage: 'granted',
analytics_storage: 'granted',
personalization_storage: 'granted'
});
5. Test Your Setup
- Use GTM Preview (Tag Assistant) to confirm the Consent Initialization tag runs first
- Use Chrome DevTools → Network to confirm no GA or Ads fire before consent
- Check
gtm.consentStatein your browser console
6. Summary
- ✅ Consent Mode enabled in GTM container settings
- ✅ Each tag linked to required consent types
- ✅ ConsentPress injects the update signals automatically
- ✅ You’ve tested it using GTM preview and browser console
With ConsentPress, you skip the manual scripts — just configure your GTM tags and you’re fully Consent Mode v2 compliant.