Home / Fix guides / Analytics, cookies and GDPR

How to set up Google Consent Mode v2

Google Consent Mode v2 is a setting that tells Google's tags (Analytics, Ads) what your visitors agreed to in your cookie banner. To set it up you need a cookie banner (a consent management platform) that supports it, and your Google tags must be told to wait for the visitor's choice.

Consent Mode v2 is how your cookie banner talks to Google. When a visitor accepts or rejects cookies, the banner passes that choice to Google Analytics, Google Ads and other Google tags, and the tags change how they behave. If your site has a banner but Consent Mode v2 is missing, Google never hears the choice. Typical symptoms are warnings in Google Ads or Analytics about missing consent signals, remarketing audiences that stop filling, and conversion numbers that drop for visitors from Europe.

What Consent Mode v2 actually is

Consent Mode works with four consent signals:

  • analytics_storage: may Google Analytics store cookies to measure visits?
  • ad_storage: may advertising cookies be stored?
  • ad_user_data: may user data be sent to Google for advertising? (new in v2)
  • ad_personalization: may data be used for personalised advertising such as remarketing? (new in v2)

The last two are what v2 added. Google has required them for advertisers who serve visitors in the European Economic Area and the UK if they want to keep using audiences, remarketing and conversion measurement.

There are two ways to run it:

  • Basic mode: Google tags do not load at all until the visitor agrees. Nothing is sent before consent.
  • Advanced mode: Google tags load straight away, but with all signals set to denied. Until the visitor chooses, they send limited, cookieless pings, and Google uses these for modelled estimates. Full measurement starts after the visitor accepts.

Which one fits you is a legal and business decision. If you are unsure, ask whoever advises you on privacy. Basic mode is the more cautious choice.

Why it matters

  • Advertising: without v2 signals, Google may stop building remarketing audiences and measuring conversions for visitors in the EEA and UK.
  • Data quality: with a working setup, Google can model some of the visits it cannot track directly, so your reports are less patchy.
  • Trust and compliance: a banner that says one thing while your tags do another is a problem under GDPR. Consent Mode is a technical tool, not legal protection on its own. It only works if your banner is honest and your tags actually respect it.

How to check your site for free

  1. Open your site in a private browser window. Do not click anything on the banner yet.
  2. Open developer tools (F12 in most browsers) and go to the Network tab. Filter for collect.
  3. Reload the page and click a Google request (for example to google-analytics.com). In the request details, look for a parameter called gcs. Its presence means some form of Consent Mode is active. A value like G100 means everything is denied, while G111 means granted. Also look for gcd, which carries the fuller v2 consent state.
  4. Click Accept on the banner, browse to another page, and check again. The values should change.

If you use Google Tag Manager, a better test is Tag Assistant (tagassistant.google.com). Connect your site in preview mode and open the Consent tab for each event. You should see a default state before the choice and an update after it.

If there is no gcs parameter at all, Consent Mode is not running. If your tags fire and set cookies before any choice, also read cookies set before consent, which is a related but separate problem.

How to fix it: the general steps

The order matters. The default consent state must be set before any Google tag runs.

  1. Pick a consent banner that supports Consent Mode v2. Look for the words "Consent Mode v2" on its feature page. Google keeps a list of certified consent management platform partners. Well-known options such as Cookiebot, Usercentrics, OneTrust, CookieYes and Complianz support it, but check the plan you are on, as support can depend on version or tier.
  2. Set the defaults. Before the visitor chooses, all four signals should normally be denied for visitors in the EEA and UK. Most banners do this for you once the Google integration is switched on.
  3. Send an update when the visitor chooses. The banner must pass the new state to Google as soon as someone accepts, rejects or customises. Again, this is normally built in.
  4. Make sure your Google tags respect it. In Google Tag Manager, the tags should be set to require the matching consent, and the banner tag should fire on the Consent Initialization trigger so it runs first. In a direct Google tag (gtag.js) setup, the default command must appear above the Google tag script in the page.
  5. Check the Google side. In Google Ads and GA4 you may need to confirm your consent settings so audiences and conversions use the signals.

If you code it by hand, the default looks like this and must run before the tag:

gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied'
});

The banner then calls gtag('consent', 'update', {...}) with the visitor's choice.

Common platforms

Exact menu names change between versions and themes, so treat these as where to look:

  • WordPress: use a consent plugin with a Google Consent Mode setting, usually under the plugin's own settings page. If Google Analytics is added by another plugin or theme, make sure the consent plugin loads first. See the WordPress guide.
  • Google Tag Manager: turn on Consent Overview in container settings, add a banner template that supports Consent Mode, and set required consent on each tag. See the Tag Manager guide.
  • Shopify, Wix, Squarespace, Webflow: these have built-in or app-based banners of varying capability. Look in the privacy or cookie settings, and check whether the banner mentions Google Consent Mode v2. If it does not, use a third-party banner that does.

How to confirm the fix worked

  • Repeat the network check above. gcs and gcd should be present, and change after you accept or reject.
  • In Tag Assistant, the Consent tab should show defaults on the first event and an update after the choice.
  • Test in a clean private window with a browser that is not blocking trackers, and test both Accept and Reject.
  • After a few days, check Google Ads and GA4 for the consent warnings. They can take time to clear.

How to stop it coming back

  • Re-test after any change to your banner, theme, tag setup or hosting platform.
  • Do not add a second copy of the Google tag directly in the page when one is already in Tag Manager.
  • Keep your banner plugin updated, and recheck its Google settings after major updates.
  • Review the issue regularly. SiteMonday's week 27 check covers GDPR and cookie consent each year, with a written report and ranked fix list, but fixing is up to you or your developer.

This page is general guidance, not legal advice.

Step by step for your platform

Questions

Is Google Consent Mode v2 mandatory?

Google requires it if you want to use audiences, remarketing and conversion measurement for visitors in the EEA and UK. It is not a law itself, but your tags still need to respect your visitors' consent under GDPR.

Is Consent Mode the same as a cookie banner?

No. The banner collects the visitor's choice, and Consent Mode passes that choice to Google tags. You need both.

Should I use basic or advanced mode?

Basic mode loads no Google tags until consent, which is the more cautious option. Advanced mode loads tags with everything denied and sends cookieless pings for modelling, so the right choice depends on your legal advice and how much you rely on measurement.

Can I set it up without a developer?

Often yes, if you use a banner with a built-in Google Consent Mode v2 option and follow its setup steps. Custom setups with Tag Manager or hand-written code are easier with a developer.

Why do my numbers drop after setting it up?

Visitors who reject cookies are no longer fully tracked, so reported visits and conversions can fall. That reflects real consent choices, and modelling in advanced mode may recover part of it.

How long until Google stops warning about missing consent signals?

It can take a few days after the signals are flowing correctly. Verify with Tag Assistant first, then check Google Ads and GA4 again later.

Related problems