Skip to main content

Consent Mode Issues

Cause: Consent Mode default state not set before GA4 loads.

Fix: Add the consent default block before the GA4 script 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>
<!-- ConsentForge -->
<script src="https://cdn.consentforge.com/consentforge.min.js" data-token="..." defer></script>
<!-- GA4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>

Symptom B: gtag('consent', 'update') not firing

How to check: DevTools → Console → window.dataLayer.filter(e => e[0] === 'consent') — should show default + update after user accepts.

Cause: gtag function not available when ConsentForge tries to update consent mode.

Fix: Ensure gtag is defined on window before ConsentForge loads (via the default block above).


Cause: Modeled conversion data takes 5–7 days to appear in Google Ads after initial Consent Mode setup.

Fix: Wait 7 days after correct setup. Verify in Google Ads → Tools → Consent Mode diagnostics.


How to check: GTM Preview → check tag firing order. ConsentForge tag should fire on "Consent Initialization" trigger.

Fix: Change the ConsentForge GTM tag trigger to Consent Initialization - All Pages (not Page View).


Verification

After fixing, confirm in DevTools Console:

// Should show 'denied' defaults then 'granted' update after accept
window.dataLayer.filter(e => e[0] === 'consent')