Most writing on Google Consent Mode v2 treats it as a compliance checklist: get a banner, link to Google’s policy page, done. That’s the right level for a marketer auditing their account — we’ve covered that checklist separately. This piece is for whoever actually has to write or review the code: what the gtag('consent', ...) API does at the wire level, how Google Tag Manager’s consent handling differs from raw gtag.js, and the specific implementation mistakes that silently break measurement even when the banner itself looks correct. Everything below is sourced directly from Google’s own developer and support documentation.
At a Glance: What Consent Mode v2 Actually Requires
| Requirement | Detail |
| Who it applies to | Advertisers and sites using Google tags/SDKs for measurement, ad personalization, or remarketing with end users in the EEA (Google’s enforcement also extends to the UK and Switzerland in related consent-audit guidance) |
| The two v2-specific signals | ad_user_data (consent to send user data to Google for advertising) and ad_personalization (consent for personalized advertising/remarketing), added alongside the original ad_storage and analytics_storage |
| Enforcement timeline | Google told advertisers the changes could require action “before March 2024” as it began enhancing enforcement of its EU User Consent Policy |
| Consequence of non-compliance | Per Google’s EU User Consent Policy, Google “may limit or suspend your use of the product, or terminate our agreement with you”; Google’s consent-mode guidance separately warns of “loss in data” if consent signals aren’t sent |
| Two implementation levels | Basic (tags blocked until interaction) or Advanced (tags load immediately, send cookieless pings while consent is denied) |
| Persistence | Consent Mode itself does not store the user’s choice — your site must persist it (e.g., a first-party cookie) and resend it on every page |
Short Verdict
If you’re implementing this yourself rather than through a certified consent management platform (CMP), the two things most teams get wrong are ordering (consent defaults must run before any Google tag fires, and your consent tool has to run before or alongside it, not after) and persistence (Consent Mode doesn’t remember anything between page loads — your code has to). Get those two things right and the rest is mostly filling in which of the four signals your banner’s categories map to. Advanced mode is the better default for most sites that want usable conversion data; basic mode is the better default if your legal team’s position is that nothing — not even a cookieless ping — should reach Google before a choice is made.
The Four Signals, Precisely
| Signal | Introduced in | What denying it does |
|---|---|---|
ad_storage | Consent Mode v1 | Blocks Google Ads cookies and device identifiers from the Google Analytics tag and Firebase SDK |
analytics_storage | Consent Mode v1 | Blocks first-party analytics cookies/app identifiers from being read or written |
ad_user_data | Consent Mode v2 | Stops sending user data to Google for advertising purposes — this disables features like enhanced conversions and user_id collection |
ad_personalization | Consent Mode v2 | Disables personalized advertising features such as remarketing. If you also set the older allow_ad_personalization_signals flag with a conflicting value, personalization is disabled outright — so implement ad_personalization explicitly rather than relying on the legacy flag |
The Default/Update Pattern
Consent Mode runs on exactly two commands. Default sets the starting state before any user choice and must execute before any config or event command on the page:
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'region': ['ES', 'US-AK'],
'wait_for_update': 500
});
The region parameter takes ISO 3166-2 codes, so you can set a stricter default for the EEA and UK while leaving other regions untouched — a default call with no region specified becomes the fallback for everyone not matched by a more specific regional default. The more specific regional match always wins. wait_for_update (in milliseconds) tells Google tags to pause briefly for an asynchronous consent banner to call update before any tag fires, which matters because banners that render client-side after the page has already started loading can otherwise lose the race.
Update sends the user’s actual choice after they interact with your banner or privacy settings, and is also how you handle revocation (changing a previously granted signal back to denied):
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted'
});
Google’s own documentation flags a specific failure mode here: if an update call fires late — for example, right as the page is unloading — the consent transition can be lost entirely. Send the update as soon as the choice is made, not on a delay or deferred to an unload handler.
Basic vs Advanced: What’s Actually Different on the Wire
The distinction isn’t just “stricter vs looser” — the two modes have genuinely different data flows:
- Basic consent mode: Google tags stay blocked until the visitor interacts with the banner at all. If they decline, nothing is sent to Google — not even the fact that they declined. If they accept, tags load and send default consent states followed by the updated states. Conversion measurement falls back on Google’s general conversion model, which Google describes as less detailed than the advertiser-specific alternative.
- Advanced consent mode: Google tags load as soon as the page opens, with defaults set to denied (unless you’ve configured otherwise). While consent remains denied, tags still send consent-state and measurement pings — but cookielessly, storing no cookies and sending no full measurement data. Only once the visitor grants consent do tags send full measurement. This cookieless-ping behavior is what feeds Google’s conversion modeling, which it says becomes advertiser-specific (and more detailed) only when this data is available.
Consent-state pings carry a timestamp, referrer, user agent (on web), a boolean consent flag, a random per-page-load number, and an identifier for the consent platform in use (such as a CMP’s Developer ID). Google says it needs roughly seven full days of implementation, and a minimum data threshold per slice, before any conversion-modeling impact shows up in reporting — so don’t judge an implementation by what you see in the first 48 hours.
Two Advanced-Mode Controls Worth Knowing
Two optional gtag.js settings specifically support advanced consent mode and are easy to miss in a basic implementation guide:
- URL passthrough —
gtag('set', 'url_passthrough', true);, placed before anyconfigcommand — keeps ad-click and session identifiers in the page URL instead of a cookie, whenad_storageis denied. Without it, a denied-consent visitor who clicks through from an ad can still be effectively “lost” for attribution purposes even in advanced mode. - Ads data redaction —
gtag('set', 'ads_data_redaction', true);— strips ads-click identifiers from requests sent to Google whenad_storageis denied. This only takes effect whilead_storageis actually denied; it’s a no-op otherwise.
Google Tag Manager Is Not a Drop-In Replacement for Raw gtag Calls
This is the single most common implementation mistake Google’s own documentation calls out directly: in Google Tag Manager, don’t call gtag('consent', 'update', ...) the same way you would in a bare gtag.js setup. GTM queues gtag commands, and a queued command may not be processed before the very next event fires — which can mean a tag fires with stale consent state. Instead, GTM has its own consent APIs for this purpose: setDefaultConsentState, updateConsentState, and optionally gtagSet, used inside a consent template. Most Google-certified CMPs ship a community template that wires this up correctly, which is the main practical reason Google recommends a CMP for GTM-based sites rather than a fully custom build.
The required load order, per Google’s documentation, is: the default consent snippet first, then the Google tag itself, then your consent banner/CMP code. Google is explicit that getting this order wrong means “consent defaults won’t work” — the default has to already be in place before the tag that’s supposed to respect it even loads.
Pros and Trade-Offs of Each Implementation Path
- Certified CMP + advanced mode: least engineering effort, best conversion modeling data. Trade-off: Google tags load and ping (cookielessly) before any explicit user choice, which some legal teams are uncomfortable with regardless of the technical cookieless guarantee.
- Certified CMP + basic mode: cleanest privacy story — literally nothing reaches Google pre-consent. Trade-off: weaker, generalized conversion modeling until consent is granted.
- Fully custom gtag/GTM implementation: complete control over every signal and timing detail. Trade-off: you own getting default/update ordering, region scoping, and persistence exactly right — and re-verifying it every time Google changes the API, since none of this is abstracted away for you the way a CMP template handles it.
Who Needs to Act
Any site or app using Google tags or SDKs for ad personalization, remarketing, or conversion measurement with visitors in the EEA needs verifiable consent signals flowing to Google — this also covers Google Analytics data used inside Google Ads, Search Ads 360, or Display & Video 360, per Google’s own guidance. If you’re already on a Google-certified CMP with ads personalization enabled, confirm with your provider that they’re running the current Consent Mode v2 template rather than assuming an existing integration was auto-upgraded. If you built your own banner and consent logic, audit it specifically against the ordering and persistence issues above — they’re the failure modes that pass a quick visual check of the banner while still sending incorrect or incomplete signals underneath.
Bottom Line
Consent Mode v2 is a small API surface — two commands, four signals, two optional flags — but the implementation details that break it are almost all about timing and persistence rather than the signals themselves: load order, the GTM-specific consent API instead of raw gtag calls inside Tag Manager, and remembering that Consent Mode doesn’t store anything for you between page loads. Get a Google-certified CMP if you want that complexity handled for you; if you’re building it yourself, treat the ordering requirement as non-negotiable and test consent state changes across a full page reload, not just in the same session.
FAQ
Does Consent Mode v2 replace my consent banner?
No. Google’s documentation is explicit that Consent Mode doesn’t provide a banner or collect consent itself — it’s the API that tells Google tags what your banner’s consent choices were, so it has to work alongside a banner or CMP, not instead of one.
Is advanced consent mode required?
No, Google documents both basic and advanced as valid implementations. Advanced enables advertiser-specific conversion modeling; basic is the stricter, fully-blocked-until-consent option.
Why would my consent signals silently fail in Google Tag Manager even though the banner displays correctly?
The most common cause, per Google’s own guidance, is calling the raw gtag('consent', 'update', ...) command inside GTM instead of using GTM’s dedicated consent APIs (setDefaultConsentState/updateConsentState) — GTM queues gtag commands, so timing isn’t guaranteed the way it is in a bare gtag.js page.
What happens if I never implement Consent Mode for EEA traffic?
Google’s EU User Consent Policy states it may limit or suspend use of the relevant Google product, or terminate its agreement with you, for non-compliance; separately, Google’s technical documentation warns that skipping verifiable consent signals “may lead to loss in data” for measurement and personalization features.
How does this relate to a consent management platform (CMP)?
A CMP handles displaying the banner and collecting the user’s actual choice; many Google-certified CMPs then automatically translate that choice into the correct Consent Mode signals for you, including the GTM-specific wiring described above. For how to evaluate and choose a CMP itself, see our comparison of consent management platforms for ad compliance.
Sources
- Google for Developers — Consent mode implementation guide (gtag.js and Google Tag Manager)
- Google for Developers — Consent mode concepts (basic vs advanced)
- Google Ads Help — About consent mode
- Google Ads Help — Updates to consent mode for traffic in the European Economic Area (EEA)
- Google Ads Help — Adapt to privacy and regulatory changes with consent mode
- Google — EU User Consent Policy
