Google Consent Mode v2: what it is and how to set it up

If you use Google Analytics or Google Ads and have visitors in the EEA, Google expects your website to pass on what each visitor agreed to. Consent Mode v2 is how that happens. This article explains what it is, what changes when a visitor declines, and how to set it up.
What is Google Consent Mode?
Consent Mode is a Google API that lets your cookie consent tool tell Google's tags (Google Analytics, Google Ads, Google Tag Manager) what the visitor has agreed to. The tags then adjust their behaviour: with consent they work as normal, without it they stop storing cookies for that purpose.
Google's own requirement is explicit. To keep using its measurement, ad personalisation and remarketing features for users in the EEA, you must collect their consent and share the consent signals with Google.
The four signals that matter
Google defines several consent types. Four of them decide what Analytics and Ads may do:
analytics_storageMay Google store analytics cookies, for example to measure visit duration? Controls Google Analytics.
ad_storageMay Google store advertising cookies? Controls conversion tracking and remarketing cookies.
ad_user_dataMay user data be sent to Google for online advertising? New in v2.
ad_personalizationMay Google show this visitor personalised ads? New in v2.
Each signal is either granted or denied. The consent tool sets a default when the page loads and sends an update when the visitor makes a choice in the cookie banner.
Basic or advanced mode
Google describes two ways to run Consent Mode:
- Basic mode: Google tags are blocked until the visitor responds to the banner. Nothing is sent to Google before that, and Google uses general models to estimate conversions.
- Advanced mode: Google tags load straight away with every signal set to denied. For visitors who decline, the tags send measurements without cookies, which Google uses for modelling specific to your account.
Either way, a visitor who declines does not get Google's analytics or advertising cookies. The difference is whether any cookieless data reaches Google. Basic mode is the more cautious choice, and it is what you get when you block Google's scripts until consent as shown below.
What you lose without it
If Google does not receive consent signals for your EEA visitors, you should expect limits on:
- Remarketing: showing Google Ads to people who have visited your site
- Ad personalisation: ads based on a visitor's behaviour
- Measurement: conversion tracking and modelled data for visitors who did not consent
For a small business that finds customers through Google Ads, that is a noticeable loss.
How to set it up with Consentaur
Consent Mode v2 is built into Consentaur and switched on by default. There is no separate mapping to configure:
- Install the Consentaur script as the first script in your page's
<head>, as described in the installation guide. It has to run before your Google tags so the defaults are in place first. - Defaults are set on load: Consentaur sets all four signals to
deniedas soon as it loads, and updates them when the visitor makes a choice. - Tag your Google scripts: add
data-cookiebar-category="analytics"to Google Analytics anddata-cookiebar-category="marketing"to Google Ads, so they wait for consent. - Check in Google Tag Assistant that the consent signals arrive, both before and after you accept.
This is the default state Consentaur sets when the page loads:
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
functionality_storage: 'granted',
personalization_storage: 'denied',
security_storage: 'granted',
});When the visitor chooses, each banner category updates its signals:
| Banner category | Consent Mode signals |
|---|---|
| Analytics | analytics_storage |
| Marketing | ad_storage, ad_user_data, ad_personalization |
| Preferences | personalization_storage |
| Necessary (always on) | functionality_storage, security_storage |
Getting more visitors to consent, fairly
The more visitors who consent, the better your data. What helps without crossing any lines:
- Keep the banner short and clear: explain in one sentence why you use cookies
- Match your site's design: a banner that looks like part of your website feels less intrusive
- Avoid dark patterns: an "Accept" button that outshines a hidden "Reject" may work for a while, but it damages trust, and European data protection authorities have said that a reject option hidden like this does not lead to valid consent
- Try different placements: a bar at the bottom and a centred box can give different consent rates
Frequently asked questions
Is Consent Mode v2 a legal requirement?
No. The law requires consent before non-essential cookies are set; Consent Mode is Google's way of learning what your visitors chose. Google does require it in practice: to keep using measurement, ad personalisation and remarketing for visitors in the EEA, you have to collect their consent and pass the consent signals to Google.
What is the difference between Consent Mode v1 and v2?
Version 2 adds two signals: ad_user_data (may user data be sent to Google for advertising?) and ad_personalization (may ads be personalised?). The first version relied on analytics_storage and ad_storage.
Does Google Analytics still work when a visitor declines?
Partly, and it depends on how you set it up. In advanced mode, Google tags load with consent denied and send measurements without cookies, which Google uses for modelling. In basic mode, the tags do not load at all until the visitor consents, so nothing is sent for visitors who decline and Google falls back on general modelling.
Do I need to change my Google Analytics or Google Ads set-up?
Not for the signals themselves. Consentaur sets the consent state on the page, and Google's tags read it from there. What you do need is to load the Consentaur script before your Google tags, and to check with Google Tag Assistant that the signals arrive.
Read next
Consent Mode v2 out of the box
Consentaur sets Google Consent Mode v2 for you. Install the script and the signals follow your visitors' choices from day one.
Start your free trial14-day free trial. No credit card required.