Google Consent Mode v2 in GTM: the five mistakes that leak data
Default set to granted, defaults that arrive too late, Meta tags without consent checks: how to find and fix Consent Mode v2 mistakes in Google Tag Manager.
Lukas Kontur · · 7 min read
Google Tag Manager (GTM) is how many small shops and websites load Google Analytics 4, Google Ads, the Meta Pixel and other tags from one place. Google Consent Mode v2 is how GTM learns what each visitor agreed to. When the two are wired together correctly, tags wait for consent. When one small setting is off, tags fire anyway, while your banner and your dashboards look fine. This guide covers five common mistakes, how to spot each one, and how to fix it, even if you are not a developer.
The symptoms
- A scan reports a Consent Mode mismatch: the consent state sent to Google says "denied", but analytics or ad requests and cookies still appear.
- A scan reports no Consent Mode detected although Google tags are on the page.
- The Meta Pixel or another non-Google tag fires before the banner is answered, even though "Consent Mode is set up".
- Google Ads shows warnings about consent in the Diagnostics tab of your conversion actions.
In our scan of 97,304 EU websites, 28.4% used Google Consent Mode, and 11.9% of sites showed a mismatch between the consent state reported to Google and what the browser actually did (full study).
The short version of how it should work
- On every page, a default consent state is set first, with the advertising and analytics signals
ad_storage,ad_user_data,ad_personalizationandanalytics_storageset to "denied". - Your consent banner sends an update when the visitor clicks, for example "granted" for analytics and ads after Accept.
- Each tag in GTM checks the consent state before it fires.
Google's setup guide is explicit that the default has to come first: "If your consent code is called out of order, consent defaults won't work."
How to check it yourself
- Turn on the consent overview. In GTM, go to Admin, Container Settings, Additional Settings and tick Enable consent overview (Google: consent in Tag Manager). The Tags list now has a Consent Overview icon that opens a view showing which tags have consent settings and which do not.
- Use Preview mode. Click Preview, enter your site address, and do not click the banner. In the preview window, select the earliest Consent event in the left column and open the Consent tab. The On-page Default column should show "Denied" for the four signals above. If the tab is empty, no Consent Mode runs on that page (Google: troubleshoot consent mode).
- Check which tags fired. Still without clicking, open the Tags tab, which shows which tags fired and which did not (at the time of writing, under "Tags Fired" and "Tags Not Fired"). Anything that fired ran before consent.
- Check the browser. In a new private window with DevTools (F12) open on the Network tab, filter for
collectandfacebook, and in Application, Cookies, check for_gaand_fbp.
Mistake 1: the default is "granted" (or missing)
Some setups send a default of "granted" for everything, often from an old snippet or a template whose region settings do not cover the EU. Tags then behave as if every visitor had agreed.
Fix: use your consent tool's template from the Community Template Gallery (for example the templates from Cookiebot, Usercentrics, CookieYes or Complianz), set its default to "denied" for the regions you serve, and remove any old default snippet. If your banner has no template, Google documents a default you can place above the GTM snippet in the page:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500
});
</script>
wait_for_update tells Google tags how many milliseconds to wait for the banner's update before sending data (Google: set up consent mode). For consent templates that need to look up the visitor's choice before updating, Google recommends at least 500 milliseconds (Google: consent APIs for templates).
Mistake 2: the default arrives too late
The consent template is fired on All Pages or Initialization instead of Consent Initialization - All Pages, or the banner script is loaded after GTM has already fired tags. The first page view then goes out before any default exists.
Fix: open your consent template tag and set its trigger to Consent Initialization - All Pages. Google includes this trigger in every web container for exactly this purpose. If you also have the Google tag hardcoded in your theme, remove it so that everything goes through GTM.
Mistake 3: non-Google tags have no consent check
Google tags (GA4, Google Ads, Floodlight) have Built-In Consent Checks: they read Consent Mode on their own. A custom HTML tag with the Meta Pixel, the TikTok Pixel, Hotjar or LinkedIn Insight does not. Without an extra rule, it fires on page load no matter what the visitor chooses.
Fix: open each non-Google tag, go to Advanced Settings, Consent Settings, choose Require additional consent for tag to fire, and add:
ad_storagefor advertising pixels (Meta, TikTok, LinkedIn, Pinterest);analytics_storagefor analytics and session recording (Hotjar, Microsoft Clarity).
With this setting, the tag only fires when all listed consent types are granted. Then check the trigger: if the tag only fires on the initial Page View and consent arrives later, it may never fire for visitors who accept. Many consent templates push a dataLayer event after the visitor's choice; add that event as a second trigger so the tag can fire on the same page once consent is given.
Mistake 4: the update never reaches GTM
The banner closes, but no On-page Update appears in the Consent tab of Preview mode. This happens when the banner is not connected to GTM at all, when two consent tools run side by side, or when an old template version does not send the v2 signals ad_user_data and ad_personalization.
Fix: keep one consent tool. Update its GTM template to the latest version from the gallery. In Preview mode, click Accept and confirm that a Consent event with On-page Update "Granted" appears. Then repeat with Reject and confirm that no update to "Granted" appears.
Mistake 5: tags outside GTM
A GA4 snippet in the theme, a WordPress plugin that adds its own Google tag, or a Shopify app pixel next to the same tag in GTM. Consent settings in GTM do not reach these copies.
Fix: view the page source (Ctrl + U) and search for gtag(, googletagmanager.com, fbq( and ttq.. Every match outside your GTM container either has to go, or has to be controlled by your consent tool. On Shopify, see Shopify: pixels fire before the cookie banner; on WooCommerce, see GA4 and Google Ads on WooCommerce: Consent Mode v2.
Basic or advanced: decide on purpose
Google describes two modes (consent mode overview). In basic mode, Google tags do not load until the visitor interacts with the banner. In advanced mode, Google tags load straight away with "denied" and send cookieless signals that Google uses for modelling. In advanced mode you will see requests to Google before consent, normally without the _ga cookie. Which one fits your business is your decision; just make sure your banner text matches what really happens.
How to verify the fix
- Preview, no click: Consent tab shows On-page Default "Denied" for the four signals on the earliest Consent event. Tags tab: no advertising or analytics tag has fired (in advanced mode, Google tags may fire in their restricted form).
- Preview, Reject: no On-page Update to "Granted". Meta, TikTok, Hotjar stay under "Tags Not Fired".
- Preview, Accept: On-page Update shows "Granted" and your tags fire.
- Browser: new private window, no click: no
_ga, no_fbp, nofacebookrequests. After Accept: they appear. - Google Ads: the Diagnostics tab of your conversion actions shows that consent mode is implemented. Google says this can take 48 hours, and in some cases up to two weeks (Google Ads Help).
- Publish the container. Preview changes only affect your own test session until you publish.
See also: Google Consent Mode v2 setup: basic vs advanced, and how to check it works and Complianz with Google Tag Manager: making tags wait for consent (Consent Mode v2).
Background: Pre-consent tracking explained. Using Cookiebot? See Cookiebot: visitors click Deny, but tracking continues.
Check your site in 1 minute
Our free scan compares the Consent Mode state your page sends to Google with the requests and cookies the browser actually produces, before and after the banner. No signup needed. Run a free scan.
Get alerted when it breaks
Every published GTM version can change what fires before consent. With monitoring, we re-scan your site on a schedule and email you when a tag starts firing before consent or after a rejection. Create an account and add your site.
Last updated: