Google Consent Mode v2: what it is, why you need it and how to enable it in ten minutes
Since March 2024 Google requires Consent Mode v2 from anyone using Google Ads and Google Analytics with users in the European Union. Without it, remarketing and custom audiences do not work and conversions are only half measured. Yet many sites, even with a cookie banner installed, have not configured it or have configured it wrongly. This guide explains what it is and how to enable it correctly.
What Consent Mode is
Consent Mode is the way your site tells Google tags (Analytics, Ads, Floodlight) whether the user has given consent or not. It is not a banner: it is an API. The banner collects the choice, Consent Mode translates it into signals that Google tags understand and respect.
Version 2, introduced at the end of 2023, adds two signals dedicated to advertising. In total there are seven parameters:
- ad_storage: advertising cookies.
- ad_user_data: sending user data to Google for advertising.
- ad_personalization: personalised advertising and remarketing.
- analytics_storage: measurement cookies, such as those of Google Analytics.
- functionality_storage: functional cookies, such as the chosen language.
- personalization_storage: content personalisation cookies.
- security_storage: security cookies, which always stay active.
The two new parameters, ad_user_data and ad_personalization, are the ones Google requires in order to keep using advertising features in Europe.
Basic mode and advanced mode
In basic mode Google tags are not loaded until the user consents. If they refuse, Google Analytics and Google Ads do not run and send no data; with Google Tag Manager the gtm.js container is still downloaded.
In advanced mode tags are loaded immediately but, without consent, they send cookieless pings that Google uses to estimate missing conversions through modelling. These pings still carry the visitor's IP address and user agent to Google and, according to EDPB Guidelines 2/2023, they too require consent.
For a European site the cautious choice is basic mode: it follows the principle of preventive blocking to the letter, because without consent no communication towards Google starts. Advanced mode is allowed by Google, but should be assessed with whoever looks after the site's compliance.
How to enable it, step by step
The first step is to set the default state to "denied" before any Google tag is loaded. This code must sit in the page head, before Google Tag Manager, before gtag.js and before any other script:
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
functionality_storage: 'denied',
personalization_storage: 'denied',
security_storage: 'granted',
wait_for_update: 500
});The wait_for_update parameter tells tags to wait half a second before reading the state, so the banner has time to communicate a choice already stored.
The second step is to update the state when the user chooses. On Accept, the banner must send an update command with the parameters matching the accepted categories: for example analytics_storage set to "granted" if statistics are accepted, and ad_storage, ad_user_data, ad_personalization set to "granted" if marketing is accepted. A compliant banner does this automatically.
The third step, if you use Google Tag Manager, is to make sure the consent tag fires on the "Consent Initialization - All Pages" trigger, which runs before all the others. Serious banner providers offer a template for the GTM gallery that does this for you.
The fourth step is to verify. Open the site with Google Tag Assistant, Consent tab: you will see the default state on load and the update after the click on the banner. If on load the parameters show "granted", something is in the wrong order.
The most common mistakes
The default command placed after Google Analytics: the tag runs before knowing it has to wait, and cookies are written anyway.
A banner that updates only analytics_storage and ad_storage, ignoring ad_user_data and ad_personalization: this is the setup of those who installed Consent Mode before version 2 and never updated it. Google Ads treats it as incomplete.
Google scripts installed outside Tag Manager, directly in the theme or in a plugin: they bypass Consent Mode and run regardless.
No wait_for_update: someone who already consented on a previous visit sees the tags run as if they had refused, and the data is lost.
How Konsento handles it
Konsento puts Consent Mode v2 in the installation snippet, already set to "denied" for every parameter before the banner loads. When the user chooses, the banner sends the update for each category, including ad_user_data and ad_personalization. The official WordPress plugin prints the default code in the head with the highest priority, before theme and plugin scripts. For those using Google Tag Manager there is the Konsento template, which sets the default state on the initialisation trigger and loads the banner.
All of this is included in the one-time payment licence: 86 euros per domain, forever, with no higher plans to unlock. You can try it free for 15 days: konsento.cloud/en/register.