New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

Google consent mode v2, set up correctly

Consent mode v2 adds two signals to Google tags and matters for visitors in the EEA and UK. The four parameters, the default and update calls, and two modes.

Consent mode is how you tell Google's tags what a visitor has agreed to. Version 2 added two signals about advertising, and Google requires them for measurement and ad features involving users in the EEA, and it applies the same policy to the UK and Switzerland. If you only use Analytics, it still decides whether your tag sets cookies.

The four parameters

ParameterControls
analytics_storageCookies for analytics, such as GA's client ID
ad_storageCookies for advertising
ad_user_dataSending user data to Google for advertising (new in v2)
ad_personalizationPersonalised advertising, such as remarketing (new in v2)

Set defaults before the tag

gtag("consent", "default", {
  ad_storage: "denied",
  ad_user_data: "denied",
  ad_personalization: "denied",
  analytics_storage: "denied",
  wait_for_update: 500,
});
gtag("js", new Date());
gtag("config", "G-XXXXXXX");

The default must run before the config call. wait_for_update gives your banner a moment to load a stored choice before tags fire. Defaults can also be set per region with a region list, so visitors elsewhere start with granted.

Update when the visitor chooses

gtag("consent", "update", {
  analytics_storage: "granted",
  ad_storage: "denied",
  ad_user_data: "denied",
  ad_personalization: "denied",
});

Call it when the visitor accepts, and again on every page load with their stored choice.

Basic or advanced

In basic mode, you do not load Google tags until consent is granted. In advanced mode, tags load immediately with consent denied and send cookieless pings that Google uses to model conversions. Advanced gives more data; basic is simpler to explain. Your legal advice decides which fits.

Check it

Tag Assistant shows the consent state on each event. DebugView, covered in GA4 DebugView, shows whether events arrive. If nothing arrives at all, the causes are in GA4 not collecting data.

GA4 + Search Console Setup installs the tag with consent defaults already in place, in the right file for your framework, so the order of default and config is correct from the start.

Questions

What changed in consent mode v2?

Two parameters were added: ad_user_data, for sending user data to Google for advertising, and ad_personalization, for personalised advertising. They sit beside ad_storage and analytics_storage.

Is consent mode a cookie banner?

No. Consent mode tells Google tags what the visitor agreed to. You still need a banner or consent platform to ask, and it calls gtag to update consent.

What is the difference between basic and advanced consent mode?

In basic mode, Google tags do not load until consent is given. In advanced mode, tags load with consent denied and send cookieless pings, which Google can use for modelling.

Or skip the afternoonand drop one in.