Google Consent Mode v2: What It Is and How to Set It Up
Step-by-step guide to implementing Google Consent Mode v2 (Basic vs Advanced), how it affects Analytics and Ads data, and why Google now requires it.
Published
If you run Google Ads, GA4, or any tag from Google's gtag family on a site with EU visitors, you almost certainly need Google Consent Mode v2. Since March 2024, Google has required it for advertisers in the EEA, UK, and Switzerland. Without it, your remarketing audiences quietly shrink and your conversion data starts going dark.
It's also frequently misunderstood. Most teams I've walked through this have the same confusion: they think GCM v2 is a cookie banner, or a consent management platform, or a replacement for one. It's none of those things. It's a signal protocol between your CMP and Google's tags. A way to tell GA4 and Google Ads what the visitor just chose, in a format Google can act on.
This guide covers the four signals, the difference between Basic and Advanced mode, what changes in your reports after you implement it, and the implementation mistakes I see most often.
What GCM v2 actually does
Before Consent Mode existed, a site with a cookie banner had a binary choice: either fire the GA4 tag or don't. If the visitor said no, you got nothing. No pageview count, no traffic source, no funnel signal.
Consent Mode (introduced 2020) added a middle ground. You always load the gtag library, but you set consent signals telling it what the visitor allowed. If statistics consent is denied, the tag still loads. It just sends a stripped-down cookieless ping with no client ID, no cross-site identifier, and no GA cookies. From those pings, Google's models infer the rest of the funnel using BigQuery ML. You don't get raw events, but you don't get nothing.
GCM v2 (March 2024) added two new signals for the digital advertising context, after the EDPB started pressing Google about the legal basis for ad personalisation. So instead of one ad signal, there are now four:
| Signal | What it controls |
|---|---|
ad_storage | Permission to store ad-related cookies (e.g. _gcl_au for conversion attribution) |
analytics_storage | Permission to store analytics cookies (_ga, _ga_*) |
ad_user_data | Permission to send user data (IP, hashed email) to Google for advertising purposes |
ad_personalization | Permission to use that data for personalised remarketing |
The first two were already there in GCM v1. The bottom two are new and they're the reason Google made v2 mandatory. Without them, Google can't justify the legal basis for personalised advertising under GDPR.
Basic mode vs Advanced mode
Google sells GCM v2 in two flavours and the distinction matters.
Basic mode: nothing runs until consent. You block gtag.js entirely with script blocking and only load it after the visitor accepts. If they deny, you load nothing. No pings, no modeling, nothing.
Advanced mode: gtag.js loads on every page, immediately. Before the visitor chooses, all four signals are set to denied by default. The library sends cookieless pings while waiting for the visitor. Once they choose, you call gtag('consent', 'update', {...}) and the signals flip.
If you read between the lines of Google's docs, Advanced mode is what they want you to do. Conversion modeling only works with Advanced. Cookieless pings only work with Advanced. The traffic source inference, the audience modeling, the behavioural metrics estimation: all of it requires gtag to have been called on the page, even before consent. Basic mode keeps you compliant under the strictest reading of the law, but you lose most of the modeling benefit Google built the system for in the first place.
Most CMPs (ours included) default to Advanced. If your DPO has a strong position favouring strict denial-before-load, Basic is supported too.
What the code looks like
The minimal Advanced-mode implementation, without a CMP, is two scripts in your <head>:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
// Set defaults BEFORE gtag.js loads
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500
});
</script>
<!-- Now load gtag.js -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>The wait_for_update: 500 line gives your cookie banner 500ms to call gtag('consent', 'update', ...) before the first ping fires. Without it, the first pageview ping goes out with everything denied, which is usually fine but occasionally causes timing artifacts in your reports.
When the visitor clicks Accept in your banner, you fire:
gtag('consent', 'update', {
ad_storage: 'granted',
analytics_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted'
});If they only accept the statistics category in granular preferences, you grant analytics_storage but leave the ad signals denied. With ConsentTrustee, the runtime fires those update calls automatically based on which categories the visitor accepts. You don't have to write any of the consent-handling JS yourself, just include our script and your standard gtag('config', ...) line.
Two technical notes that bite people. First, the visitor's updated state has to survive page loads. Store it in a first-party cookie or localStorage and replay the matching update call on subsequent pageviews, otherwise every new page starts from denied and you get the wrong attribution. ConsentTrustee handles this for you. Second, if you use Google Tag Manager instead of gtag.js directly, you don't call gtag('consent', ...) at all. GTM has its own APIs (setDefaultConsentState, updateConsentState) used inside tag templates, and mixing them with raw gtag calls on the same page leads to ordering bugs. The GTM article covers that flow.
Two flags worth knowing: url_passthrough and ads_data_redaction
These don't show up in most CMP tutorials but they're in Google's own docs and they directly change how much ad attribution you keep on the visitors who deny. Both only do anything when ad_storage is denied; with consent granted they're no-ops.
url_passthrough tells gtag to append the click identifier (gclid, dclid, gclsrc, wbraid, _gl) to outgoing same-domain links as query parameters. Without it, if a visitor lands on your site via a Google Ads click with denied consent, the gclid only lives in the URL of the first page. The moment they click an internal link it's gone. Turn it on and the gclid rides along across the session, so the conversion modeller can still attribute the eventual purchase to the right campaign through link decoration alone.
gtag('set', 'url_passthrough', true);Place this before any config call. ConsentTrustee flips it on automatically when GCM v2 is enabled.
ads_data_redaction goes the other way. When this is true and ad_storage is denied, Google strips ad click identifiers from the outgoing pings to Google Ads and Floodlight. Use it if your DPO wants belt-and-suspenders behaviour on denied traffic: no identifiers leave the page, not even through the cookieless ping pipeline.
gtag('set', 'ads_data_redaction', true);The two flags interact in a useful way. url_passthrough keeps attribution alive through URL decoration; ads_data_redaction scrubs the identifier from outgoing network requests. Used together on a denied visitor, gclid stays on-site for first-party measurement but never reaches Google's servers with the personal context attached. That's the configuration most EU-focused CMPs ship.
Geo-targeting with the region parameter
The default-consent call accepts a region array of ISO 3166-2 codes, which lets you ship different defaults to different geographies in a single page load:
// EU/UK/CH defaults: everything denied
gtag('consent', 'default', {
ad_storage: 'denied',
analytics_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
region: ['DE', 'FR', 'IT', 'ES', 'GB', 'CH'],
wait_for_update: 500
});
// Rest of the world: granted
gtag('consent', 'default', {
ad_storage: 'granted',
analytics_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted'
});More specific regions win over less specific ones, so you can layer US-CA on top of US if you want CCPA-style defaults only for California. ConsentTrustee's geo-targeting feature generates these blocks for you based on the regions you toggle in the dashboard, so you don't hand-roll them.
How to tell if it's working
The honest answer is that GCM v2 is hard to verify in production because most of the signals are invisible to you. But here are the tests that actually work.
Check the network tab. Load your site in incognito with DevTools open. Look for requests to google-analytics.com/g/collect. In the URL or POST body you'll see a gcs parameter:
gcs=G100— both ad_storage and analytics_storage deniedgcs=G110— analytics granted, ad deniedgcs=G111— both granted
You should see G100 before any consent action, then transition to G110 or G111 after accepting. If you see G111 before clicking anything, your defaults aren't actually defaulting. That's a fixable bug, usually in script ordering.
Check the gcd parameter. This is the GCM v2 encoded consent state for all four signals. Not human-readable, but it should change between pageviews if the visitor changes their consent mid-session.
Look for pscdl=denied. If you see this in your collect URLs, you're sending pings while in the cookieless state. That's the modeling pipeline working.
Use Google's Tag Assistant. It exposes the signal state on each event and tells you whether the page is properly in Advanced mode.
The implementation mistakes I see
Defaults not actually defaulting. The most common bug: someone writes the gtag('consent', 'default', {...}) block but puts it after the gtag.js loader instead of before. By the time the defaults are set, the first pageview has already gone out with implicit granted. The fix is sequence: defaults first, library second.
Forgetting the two new v2 signals. Sites that implemented GCM v1 in 2021 and haven't touched it since are still only sending ad_storage and analytics_storage. Google's behaviour for EU traffic now depends on all four. Without ad_user_data and ad_personalization, your audience lists for Google Ads start eroding over the course of a few weeks. There's no error message. Just shrinking audiences.
Calling update on every page load. Harmless, but it inflates dataLayer noise and can break custom GTM triggers that fire on consent state changes.
Setting analytics_storage: granted and then not loading GA. Means nothing, but I've seen it shipped. The signal is permission, not action. You still have to fire your GA config tag.
Not persisting consent across pageviews. Google's docs are explicit about this and people still miss it. If the visitor accepts on page A and then navigates to page B, page B starts in the default-denied state again unless you stored the decision and replay the matching update call before any tags fire on B. Symptom: the first pageview after navigation looks like a denied session in your reports, even though the visitor consented. Fix: read from cookie/localStorage on each page and call update with the persisted values in the same script block as your defaults.
Updating consent after the page transition. Related to the above. If a visitor accepts and you immediately fire a navigation (a tracked outbound click, a SPA route change with a full reload), the update needs to land before the transition begins. Otherwise Google's tag loses key data points from the original page. Fire the update synchronously inside the click handler, not in a deferred queue.
When you need it vs when you don't
If your site has any EU/UK/Swiss traffic and you run Google Ads, you need GCM v2 or your remarketing audiences degrade. Google enforces this silently. There's no error message, just shrinking lists.
If you only run GA4 and never serve Google ads, GCM v2 still helps because GA4's consent-aware modeling relies on it. You can ship with just analytics_storage and skip the two ad signals if you want, though the v2 spec recommends sending all four.
If you have zero EU traffic, you're not legally required to do anything. Google still recommends GCM v2 for the analytics modeling benefits, but it's optional.
What I'd read next
If you haven't set up the cookie banner side of this yet, start with GDPR Cookie Consent. If you use Google Tag Manager instead of gtag directly, see GTM + Cookie Consent. The trigger setup is different in GTM and it's worth getting right. And our integration guide walks the full ConsentTrustee install end to end, including the GCM v2 wiring.