1. Observed Wire Symptom
Visitors in Germany, France, or the UK click 'Accept All' on your cookie banner, yet outbound /g/collect and /pagead/ requests continue transmitting gcs=G100 and gcd=13p3p3p2p5 (denied_default_no_update), causing Google Ads to drop conversion attribution.
2. Technical Root Cause
This happens when a CMP script (OneTrust, Cookiebot, Usercentrics, or a custom React/Vue banner) stores consent in its own cookie/localStorage without pushing a valid gtag('consent', 'update', { ad_storage: 'granted', ad_user_data: 'granted', ad_personalization: 'granted', analytics_storage: 'granted' }) Arguments entry to the exact window.dataLayer reference that gtm.js hooked—or reassigns window.dataLayer = [] after GTM boots, severing GTM's push listener.
<!-- Broken: Reassigning window.dataLayer wipes GTM's listener -->
<script>
function onBannerAccept() {
window.dataLayer = [{ event: "cookie_consent_accepted" }];
// gtm.js never sees the update -> gcs stays G100!
}
</script><!-- Fixed: Mutate existing dataLayer via canonical gtag() -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
function onBannerAccept() {
gtag('consent', 'update', {
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
analytics_storage: 'granted'
});
dataLayer.push({ event: 'consent_status_updated' });
}
</script>3. Post-Publish Verification Checklist
- ✓Confirm window.dataLayer is never reassigned (window.dataLayer = [...]) after gtm.js loads.
- ✓Verify /g/collect upgrades from gcs=G100 to gcs=G111 (or G101 for GA4-only setups) within 800ms of clicking Accept All.
- ✓Inspect all four Consent Mode v2 gcd slots (ad_storage, analytics_storage, ad_user_data, ad_personalization) for transition code 'r' (denied_default -> granted_after_update).
4. Practitioner Edge-Case FAQ
- Why does pushing a plain object like dataLayer.push({'0': 'consent', '1': 'update'}) fail in GTM?
- GTM's internal consent listener expects either a native JavaScript Arguments object pushed via function gtag(){dataLayer.push(arguments);} or a GTM Custom Template calling updateConsentState(). Plain object literals or custom event names like { event: 'consent_accepted' } do not mutate GTM's internal consent state table.
- Is gcs=G101 after clicking Accept All still broken if we only run GA4?
- No. On analytics-only B2B or content sites with zero Google Ads or remarketing cookies, gcs=G101 (ad_storage=denied, analytics_storage=granted) with gcd=13q3r3q2q5 is valid when the banner only collects analytics consent. It is only a defect if marketing consent was accepted yet ad_storage and ad_user_data remain denied.
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 STUCK_IN_DENIED_AFTER_ACCEPT
Paste any storefront URL to inspect live Frankfurt gcs/gcd beacons and exact GTM Tag IDs.