1. Observed Wire Symptom
OneTrust renders its banner and updates OptanonConsent cookies, yet non-Google GTM tags fire on Cold Load before C0004 is granted, or Google tags receive conflicting consent default states from both otSDKStub.js and a GTM template.
2. Technical Root Cause
Teams frequently enable OneTrust's native 'Google Consent Mode' toggle in the OneTrust tenant admin AND deploy the OneTrust CMP Community Template (__cvt_...) inside GTM on the wrong trigger ('Initialization' instead of 'Consent Initialization - All Pages'), while leaving non-Google tags bound to 'All Pages' instead of 'OneTrustGroupsUpdated' + C0004 checks.
<!-- Broken: OneTrust GTM __cvt tag placed on "All Pages" -->
Trigger: All Pages (gtm.js)
# Meanwhile Meta/LinkedIn fire on All Pages checking {{OnetrustActiveGroups}}
# before otSDKStub.js has populated C0004 or pushed OneTrustGroupsUpdated!1. Fire OneTrust CMP (__cvt) template STRICTLY on:
Trigger: "Consent Initialization - All Pages"
Category Mapping:
C0002 -> analytics_storage
C0004 -> ad_storage, ad_user_data, ad_personalization
2. Gate non-Google marketing tags with:
- Additional Consent Checks -> Require: ad_storage
- Firing Trigger: Custom Event "OneTrustGroupsUpdated"3. Post-Publish Verification Checklist
- ✓Ensure only one layer sets initial gtag('consent', 'default', ...)—either synchronous <head> / Consent Initialization template, never after gtm.js.
- ✓Verify window.OneTrust.RejectAll() leaves OnetrustActiveGroups=',C0001,' and suppresses all C0002/C0004 beacons.
- ✓Verify window.OneTrust.AllowAll() pushes OneTrustGroupsUpdated and upgrades /g/collect to gcs=G111 and gcd='r'.
4. Practitioner Edge-Case FAQ
- Should we check OnetrustActiveGroups regex C0004 in GTM triggers or use GTM Additional Consent Checks?
- Use both in tandem: map C0004 to ad_storage inside the OneTrust Consent Mode v2 integration, require ad_storage in GTM Additional Consent Checks, and use Custom Event 'OneTrustGroupsUpdated' as the firing trigger so tags execute both on Page-1 banner acceptance and on subsequent page views.
- Why did OneTrust default to granted (gcs=G111) during our cloud staging test?
- OneTrust's Geolocation Rules resolve the visitor IP via OneTrust.getGeolocationData().country. If your staging scanner exits from a US IP (or a cloud ASN misclassified as US), OneTrust applies your US Opt-Out rule (default granted). Always test EEA behavior from a verified European exit node.
Did this GTM remediation playbook help resolve your issue?
1-click practitioner feedback — shapes which CMP & GTM edge cases we document next.
Verify If Your Container Suffers From CMP_OPT_OUT_INEFFECTIVE
Paste any storefront URL to inspect live Frankfurt gcs/gcd beacons and exact GTM Tag IDs.