Verify Consent Mode before Google tags load
Confirm default in the dataLayer before GA4 or Ads, then confirm update on Accept and Decline. Use head install or GTM, not both.
Head install check
View source or DevTools Elements. consent-widget.js with your data-configuration-id should be the first script in <head>. Then:
Step 1. Open a clean window
Incognito, no leftover sitetrust_consent. DevTools → Console.
Step 2. Paste the logger before reload
Paste the snippet below, press Enter, then reload so you catch the first default.
window.dataLayer = window.dataLayer || [];
var _push = window.dataLayer.push;
window.dataLayer.push = function() {
var args = arguments[0];
if (args && args[0] === 'consent') console.log('[Consent Mode]', args[1], args[2]);
return _push.apply(this, arguments);
}You should see a default with ad_storage, analytics_storage, ad_user_data, and ad_personalization denied, and wait_for_update: 500. After geo, you may see a second default. EEA / UK / CH stay denied. Other regions may grant analytics_storage only.
Accept and Decline
- Click Accept All. You should see update with all four signals granted (if those categories were allowed).
- In a new Incognito window, click Decline. You should see update with all four denied.
- Network: GA4 (
G-) and Ads (AW-) must not complete a collection hit before the first default. After Decline they should stay off in basic mode.
GTM install check
In GTM Preview, both SiteTrust tags must fire on Consent Initialization, and the widget tag must be sequenced after Consent Default. GA4 and Google Ads tags should use Built-in Consent Checks. Full tag setup: Install via Google Tag Manager.
If you also pasted consent-widget.js in the site head, remove one of the two copies. Double load is a failed install.
What “before Google tags load” means in Network
- The consent default push is visible before
gtag/js?id=G-orgtag/js?id=AW-becomes active. - GTM container
gtm.jsmay load, but Google tags inside it must wait on consent. - Meta, Hotjar, Clarity, and similar tags are not Consent Mode signals. Basic mode still blocks those scripts until the matching category is granted.
If default never appears
- The Configuration ID is missing or wrong.
- The script is in the footer, in
afterInteractive, or behind a tag that fires on Window Loaded. - An ad blocker or a strict browser extension is stripping
consent-widget.js. - You are testing a preview URL that strips custom code.
Related
When signals look right, still run Site Audit. Consent Mode can pass in Console while an iframe pixel still fails Run A.
Need help?
Email wecare@sitetrust.com with your site URL and platform. One business day response, Monday through Friday.