Consent Mode: check that the default loads before your tags
Checked against Google, Meta and TikTok documentation on
Consent Mode needs the default consent state set before any tag uses or updates consent. Put the default above the Tag Manager snippet, or fire it on the Consent Initialization trigger, and let every other tag run after it. Google notes that setting the default too late may not have the anticipated effect.
A default, line by line
<head>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Runs before any Google tag and before the GTM snippet
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied', // added in v2
ad_personalization: 'denied', // added in v2
analytics_storage: 'denied'
});
</script>
<!-- GTM snippet goes below this -->
The four keys are the ones in Google's consent guide. Denied is the cautious value, but a single global denied costs you measurement in regions where consent is not required. Google's guide documents region-specific defaults and a wait_for_update delay for consent tools that need a moment to load, so choose per region instead of copying one value everywhere, and set the values your own legal advice calls for.
Three ways to see the order
- Alioramus. The Site tab shows the consent state the page reached. The Issues tab flags consent update seen with no earlier default and lists the events that fired before it.
- The console. Run
console.table(window.dataLayer). A consentdefaultentry should sit near the top, before any event. - Tag Assistant. It reports an error when a tag reads or writes cookies before the default is set, and its Tags tab shows which tags fired and which were blocked by the consent state.
Test in a private window, which starts with no stored consent choice.
When a consent tool sets the default
Many consent tools ship a Tag Manager template. Google's Tag Manager help says the Consent Initialization trigger fires before all other tags, including Initialization triggers, and is meant for tags that set or update consent. Put the consent tool's tag there and fire everything else afterwards. A banner that loads late, or a script injected above your head code, is a common reason the order is still wrong.
What this check cannot tell you
It confirms order, not compliance. No debugger knows which consent your visitors are legally required to give. Tags blocked by consent also look like missing data, so if a pixel goes quiet, start with the request check. Plain email addresses in requests are a separate problem that consent does not solve: see how to find them. If Google Ads stops recording after you add consent, the conversion status checklist covers it.
Questions people ask
Which signals did Consent Mode v2 add?
ad_user_data and ad_personalization, next to ad_storage and analytics_storage.
Why do some of my tags look blocked in Tag Assistant?
Tag Assistant shows tags that were blocked by the consent state. While consent is denied, that is the expected result for tags that need it.
Can I test without clearing cookies?
Yes. A private window starts without a stored consent choice.
