Consent Mode v2
Consent Mode v2 is a Google feature that tells Google tags, such as GA4 and Google Ads, what each visitor agreed to on your cookie banner. The tags then change how they behave: they store cookies only when allowed, and send less data, or none, when consent is denied. This page is general information, not legal advice.
- Four signals: ad_storage, analytics_storage, ad_user_data and ad_personalization carry the visitor's choice.
- Two modes: Basic mode holds tags back until a choice is made; advanced mode loads them with consent denied.
- Modelling: When consent is denied, Google can estimate some missing conversions from cookieless signals.
- Required for some regions: Google requires consent signals for visitors in the European Economic Area and the UK to use certain ad features.
- Works with a banner: Consent Mode does not show a banner; a consent tool does, and passes the choice on.
This tutorial follows one example: a D2C Ayurvedic skincare brand from Kochi. It sells across India, ships to customers in the UK and Europe, and runs Google Ads and Meta ads. It uses GA4 and Google Ads conversion tracking, and it wants its tags to follow each visitor's choice.
Prerequisites for Consent Mode v2
- Google tags in place: GA4 and Google Ads tags installed, ideally through Google Tag Manager, as set up in the GA4 tutorial.
- A consent banner: A consent management platform (CMP) or a custom banner that records choices. Google lists certified CMP partners.
- A privacy notice: A page explaining what the store collects and why, in line with the DPDP Act for marketers.
- Access: Admin access to Google Tag Manager, GA4 and Google Ads.
- A decision on regions: Legal advice on which visitors see which default, for example denied for Europe and the UK.
Setup: Understand the Four Consent Parameters
| Parameter | What it controls | Kochi store example |
|---|---|---|
| ad_storage | Cookies used for advertising, such as click IDs | Stores the Google Ads click ID when a visitor lands from an ad |
| analytics_storage | Cookies used for analytics, such as visit length | Lets GA4 recognise a returning visitor |
| ad_user_data | Sending user data to Google for advertising | Allows purchase data to reach Google Ads |
| ad_personalization | Using data for personalised ads | Allows remarketing to people who viewed the face oil |
ad_user_data and ad_personalization were the two parameters added in version 2.
Basic vs Advanced Consent Mode
| Basic mode | Advanced mode | |
|---|---|---|
| Before the choice | Google tags do not load | Tags load with the default, usually denied |
| If consent is denied | No data sent to Google | Cookieless pings sent, without cookies |
| Conversion modelling | General model only | Model built on your own site's pings |
| Setup effort | Tags wait for the banner | Defaults set before tags, updates after |
The Kochi store chooses advanced mode, after its privacy advisor agrees, because it wants modelled conversions for its European sales.
Step-by-Step: Set Up Consent Mode v2
Step 1: Pick and Configure the Consent Banner
Choose a CMP that supports Consent Mode v2. Set the categories to match the parameters: an Analytics category and an Advertising category. Offer Accept all, Reject all and a way to choose by category, with Reject as easy to find as Accept.
Step 2: Set the Consent Default Before Any Tag
The default runs first on every page, before the Google tag loads. On a hard-coded site it sits above the Google tag snippet in the page head:
// Runs before any Google tag loads
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Default for every visitor until they choose
gtag("consent", "default", {
ad_storage: "denied",
analytics_storage: "denied",
ad_user_data: "denied",
ad_personalization: "denied",
wait_for_update: 500
});- Denied first: All four start as denied, so no ad or analytics cookie is set before a choice.
- wait_for_update: Gives the banner up to 500 milliseconds to load a stored choice before tags fire.
- Same default in India: The store denies by default for Indian visitors too, because the DPDP Act expects consent before most tracking. Your advisor may decide differently.
- Regional defaults: A default can also carry a region list of country codes, such as region: ["GB", "FR"], to apply it only to those visitors.
In Google Tag Manager, the CMP's template sets the default on the Consent Initialization - All Pages trigger instead of code.
Step 3: Send an Update When the Visitor Chooses
When the visitor clicks a button, the banner sends an update. For Analytics only:
// Runs when the visitor clicks "Analytics only"
gtag("consent", "update", {
ad_storage: "denied",
analytics_storage: "granted",
ad_user_data: "denied",
ad_personalization: "denied"
});For Accept all, all four values are "granted". The banner stores the choice and sends the same update on later pages, so the visitor is not asked again.
Step 4: Check Tag Settings in Google Tag Manager
Open Admin > Container Settings and turn on the consent overview. Google tags have built-in consent checks, so they need no extra setting. Other tags, such as the Meta Pixel, need Additional consent checks set to ad_storage, or a trigger that fires only after consent.
Step 5: Test with Tag Assistant
- Open the site through Tag Assistant from a UK location, or with a VPN set to the UK.
- Before clicking the banner, check that the consent default shows all four parameters as denied.
- Click Analytics only and confirm the update shows analytics_storage as granted.
- In advanced mode, confirm that Google Ads tags send pings without setting ad cookies.
Step 6: Confirm in Google Ads and GA4
After a few days, open the consent diagnostics for conversion actions in Google Ads, and the consent settings status in GA4 Admin. Both should show that consent signals are active.
Common Mistakes
- Default set too late: If the default runs after the Google tag, cookies are set before the visitor chooses.
- Only two parameters: Sites still sending only ad_storage and analytics_storage miss the two version 2 signals.
- Hidden reject button: A banner that makes rejecting harder than accepting does not give a real choice.
- Non-Google tags ignored: Consent Mode controls Google tags only. The Meta Pixel and other tags need their own consent checks.
- Never testing: A banner can look fine while its update never reaches the tags.
Next Steps
- Better matching: Add enhanced conversions for visitors who consent, so more sales are credited.
- Server-side tags: Move tags to a server container with server-side tagging, which also respects consent.
- Plan for fewer signals: Read cookieless marketing for measuring when many visitors decline.
How AI Changes Consent Mode v2
What AI Automates Now
Google uses machine learning to model conversions from people who declined cookies, and shows modelled numbers in reports. AI assistants can also read a Tag Assistant export and explain why a tag fired before consent.
What Still Needs a Human
Deciding the default for each region, the wording of the banner, and which tags belong in which category is a legal and business decision. A person must also test the setup on real devices.
Risk to Watch
Modelled conversions are estimates. Budgets moved on modelled numbers alone can go to the wrong campaign. Also, AI-written code snippets often use outdated parameter names, so check every snippet against Google's current documentation.
Do It with AI
Use this prompt to draft a Consent Mode v2 plan for your site. It works in ChatGPT, Claude or Gemini.
You are a web analytics specialist. Website: [type of business, platforms such as Shopify or WordPress] Visitors from: [countries or regions] Tags on the site: [GA4, Google Ads, Meta Pixel, others] Consent tool: [name of the banner or CMP, or none yet] Mode chosen: [basic or advanced] 1. Map each tag to the Consent Mode v2 parameters it depends on. 2. Write the gtag consent default and update commands for my regions. 3. List which non-Google tags need extra consent checks in Google Tag Manager. 4. Give a test checklist for Tag Assistant. Use only the four v2 parameters and mark anything that depends on current Google policy for me to verify.
- List every tag on the site from Google Tag Manager.
- Fill in the prompt and run it.
- Compare the code with Google's documentation and your CMP's guide.
- Test in Tag Assistant before publishing the container.
Check Before You Use It
- Facts: Check parameter names and region codes against Google's current documentation.
- Brand fit: Make the banner text match the store's voice and language, not a legal block of text.
- Compliance: Have the defaults and banner reviewed for each region you serve, and keep records of consent.
Quick Quiz
Pick an answer to check yourself. Nothing is saved.
Question 1 / 3
1. The Kochi skincare store's visitor clicks Analytics only. Which parameter should be granted?
Frequently Asked Questions
Is Consent Mode v2 mandatory in India?
Google's requirement is tied to visitors in the European Economic Area and some nearby countries. Indian law does not name Consent Mode, but the DPDP Act expects consent for most marketing uses of personal data, so many Indian sites use it for all visitors. Check the current Google policy and take legal advice.
What is the difference between basic and advanced Consent Mode?
In basic mode, Google tags do not load until the visitor makes a choice, and nothing is sent if they decline. In advanced mode, tags load at once with consent denied and send cookieless pings, which Google uses to model conversions it cannot observe.
What do ad_user_data and ad_personalization control?
ad_user_data says whether user data may be sent to Google for advertising. ad_personalization says whether that data may be used for personalised ads, such as remarketing. Both were added in version 2, next to ad_storage and analytics_storage.
Do I need a paid consent management platform?
Not always. You need a banner that records choices and passes them to Google tags. Many consent platforms offer a Google Tag Manager template that does this. Google asks some publishers to use a certified platform, so check whether that applies to you.
How do I know Consent Mode v2 is working?
Use Google Tag Assistant to see the default and update commands and the consent state of each tag. Then check the consent diagnostics in Google Ads and GA4, which show whether consent signals are arriving.
Related Articles
- Google Tag Manager TutorialGoogle Tag Manager tutorial: set up tags, triggers, variables, the dataLayer and preview mode step by step, with a Jaipur restaurant booking example.
- GA4 Tutorial for BeginnersGA4 tutorial for beginners: create a property, install the Google tag, track purchases as key events and read your first reports, with a D2C store example.
- Google Ads Conversion TrackingSet up Google Ads conversion tracking: the Google tag, purchase values in INR, GA4 imports and enhanced conversions, with a Coimbatore UPI store example.
- Enhanced Conversions and Offline Conversion ImportEnhanced conversions and offline conversion import explained: hashed first-party data, GCLID uploads and consent, with a Gurugram interiors firm example.
- DPDP Act for MarketersDPDP Act for marketers explained simply: consent, notice, withdrawal, user rights and children's data, so your leads and campaigns stay on the right side.
- Cookieless MarketingCookieless marketing explained: what third-party cookies did, where Chrome, Safari and Firefox stand, and the signals that let you target and measure.