Consent mode is a feature of Google's tags (the Google tag, gtag.js, and Google Tag Manager). Your cookie banner asks visitors what they allow. Consent mode carries that answer to Google's tags as a set of "granted" or "denied" values, and the tags adjust. If a visitor denies advertising cookies, for example, Google's tags don't set them.
It doesn't show a banner and doesn't decide what you're legally required to ask. You still need a banner or a consent management platform (CMP) for that. Google Ads Help
The consent types
Each type is one switch, set to granted or denied:
| Consent type | What it controls |
|---|---|
ad_storage |
Cookies or device IDs used for advertising |
ad_user_data |
Sending user data to Google for online advertising |
ad_personalization |
Personalized advertising, including remarketing |
analytics_storage |
Cookies or IDs used for analytics, such as visit duration |
functionality_storage |
Storage that makes the site work, such as a language setting |
personalization_storage |
Storage for personalization, such as video recommendations |
security_storage |
Storage for security, such as login and fraud prevention |
What "consent mode v2" means
"Consent mode v2" is Google's name for the update of November 2023, which added ad_user_data and ad_personalization. Google tied it to stronger enforcement of its EU user consent policy.
For visitors in the European Economic Area (EEA), Google says advertisers must collect consent and pass it to Google to keep using its tags for measurement, ad personalization and remarketing. If you use personalized advertising, such as remarketing, your setup must send the two newer types. If you already use consent mode and don't personalize ads, Google says you need to change nothing. Google Ads Help
You'll also see v2 explained as Google's answer to the EU's Digital Markets Act. Google's own pages name only its EU user consent policy.
Basic or advanced
You choose how Google's tags behave before the visitor answers the banner.
| Basic | Advanced | |
|---|---|---|
| Before the visitor chooses | Google tags don't load | Tags load with your default values, usually denied |
| If the visitor declines | Nothing is sent to Google, not even the choice | Tags send cookieless pings |
| If the visitor accepts | Tags load and measure normally | Tags switch to full measurement |
| Conversion modeling | A general model | A model specific to your account, with more detail |
Cookieless pings carry no cookies. They contain what the browser sends anyway, such as the time, user agent and referrer, plus non-identifying flags: the consent state, whether an ad click ID was in the URL, and a random number that changes on every page load. Google uses them to model the conversions and visits it can't measure directly.
Which mode is right is partly a legal question, because advanced sends those pings before anyone has agreed. Decide it with whoever handles privacy for your site, under the rules where your visitors are, such as the GDPR.
How to set it up
If your CMP supports consent mode, it can send the commands for you; check its documentation. To do it yourself with gtag.js, follow three rules from Google's setup guide:
- Set defaults first. Call the
defaultcommand on every page, before any command that sends data (such asconfigorevent). - Update when the visitor chooses. Call
updateas soon as they answer the banner, and well before they leave the page. - Remember the choice yourself. Consent mode doesn't store it. Your banner must save it and send
updateagain on later pages.
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
// later, after the visitor accepts:
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted'
});
Two options help in practice. Add a region list (ISO 3166-2 codes such as 'ES' or 'US-CA') to apply a default only in certain places; the most specific region wins. And if your banner loads slowly, wait_for_update (in milliseconds) gives it time to send update before tags fire.
With Google Tag Manager, Google recommends loading your banner through the container with a consent mode template, either your own or one from the Community Template Gallery.
How to tell it's working
Google's Tag Assistant has a consent mode view for troubleshooting. A quick manual check works too: open your site in a private window, decline, and watch the network requests in your browser's developer tools: in advanced mode you should see Google requests without cookies; in basic mode, none. Accept, and full requests should follow.
Modeled results take time. After at least 7 full days, Google Ads and Google Analytics may have enough data to report the impact of consent mode, and they show it only once your data passes a minimum volume. Reports in Google Analytics and Google Ads will differ from the period before, so note the setup date.