ConsentPulse
<- All Guides/Head Race Conditions/MISSING_WAIT_FOR_UPDATE

Fixing Missing wait_for_update: Why Returning Consented Users Send gcs=G100

Preventing async CMP cookie hydration delays from stripping attribution on repeat page views and checkouts.

1. Observed Wire Symptom

A visitor clicks Accept All on your landing page (gcs=G111), then clicks through to /product or /checkout—where the initial page_view fires with gcs=G100 (denied) before upgrading 200ms later, fragmenting GA4 sessions and losing gclid continuity.

2. Technical Root Cause

On every new page navigation, your synchronous <head> block sets default consent to 'denied' at 0ms. If your CMP loads asynchronously from a CDN (otSDKStub.js, Usercentrics, Didomi), it takes 120–350ms to parse stored consent cookies and push gtag('consent', 'update', granted). Without wait_for_update: 500, Google tags fire immediately in a denied state before the stored consent hydrates.

BROKEN PATTERN
<script>
  // Broken: Missing wait_for_update causes Google tags to fire at ~40ms
  // as gcs=G100 before async CMP reads OptanonConsent cookie at ~220ms!
  gtag('consent', 'default', {
    ad_storage: 'denied',
    ad_user_data: 'denied',
    ad_personalization: 'denied',
    analytics_storage: 'denied'
  });
</script>
REMEDIATED PATTERN
<script>
  // Fixed: Hold initial Google tag dispatch up to 500ms for CMP update
  gtag('consent', 'default', {
    ad_storage: 'denied',
    ad_user_data: 'denied',
    ad_personalization: 'denied',
    analytics_storage: 'denied',
    wait_for_update: 500
  });
</script>

3. Post-Publish Verification Checklist

  • ✓Add wait_for_update: 500 to your synchronous gtag('consent', 'default', ...) block in <head>.
  • ✓Keep wait_for_update between 300ms and 800ms—values like 5000ms risk dropping page_view hits when unconsented visitors bounce quickly.
  • ✓Accept cookies on Page 1, navigate to Page 2 with DevTools Network preserve-log enabled, and verify the very first /g/collect on Page 2 carries gcs=G111.

4. Practitioner Edge-Case FAQ

Does wait_for_update delay non-Google Custom HTML tags in GTM?
No. wait_for_update only instructs Google's native tags (GA4, Google Ads, Floodlight) to pause up to N milliseconds for a consent update command before firing their initial ping. Non-Google tags must still be gated via CMP consent-ready event triggers.
Can we read the CMP cookie synchronously in <head> to avoid wait_for_update latency altogether?
Yes—high-performance storefronts often parse the first-party consent cookie (e.g., CookieConsent or OptanonConsent) inline in <head> to emit an immediate synchronous consent update for returning visitors while keeping wait_for_update: 500 as a fallback.

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 MISSING_WAIT_FOR_UPDATE

Paste any storefront URL to inspect live Frankfurt gcs/gcd beacons and exact GTM Tag IDs.

Audit URL Free ->
View 2,328-Site Study ->