# Set up Consent Mode v2 if you use Google tags

- Check 41.22 · Tracking and analytics setup · Critical
- Source: https://checklist-seo-geo.com/en/tracking-analytics-setup/set-up-consent-mode-v2
- Send Google the four Consent Mode v2 signals from gtag.js, Tag Manager, WordPress or Shopify, then check them in Tag Assistant.
- Updated on 2026-11-27
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/tracking-analytics-setup/set-up-consent-mode-v2.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Consent Mode v2 is the Google protocol through which your cookie banner tells Google tags what the visitor has agreed to. It relies on four signals, set to “denied” before the tags load, then updated once the visitor has chosen. Once this check is done, every request sent to Google Analytics 4 or Google Ads carries the actual consent state. This is a measurement task: it has no effect on rankings.

## Why it matters

Consent Mode does not display any banner. It passes on to Google tags the choice recorded by your banner or your CMP (Consent Management Platform), and the tags adjust their behavior accordingly.

Four signals carry that choice. The last two were added in November 2023: that is what “v2” refers to.

| Signal | What it allows |
|---|---|
| `ad_storage` | Reading and writing advertising cookies |
| `analytics_storage` | Reading and writing analytics cookies (`_ga`) |
| `ad_user_data` | Sending user data to Google for advertising purposes |
| `ad_personalization` | Personalizing ads, including remarketing |

Google's EU user consent policy requires you to obtain consent from visitors in the European Economic Area (EEA), the United Kingdom and Switzerland for cookies and for ad personalization. For that traffic, Google asks advertisers to pass this consent on to it in order to use measurement, personalization and remarketing. If the consent state does not reach Google, it cannot verify the visitor's choice, which can lead to data loss, its documentation warns.

There are two implementations:

| | Basic mode | Advanced mode |
|---|---|---|
| Tag loading | Blocked until the visitor chooses | As soon as the page opens, with a default state of denied |
| If consent is denied | Nothing is sent to Google, not even the consent state | Cookieless signals (“pings”) are sent |
| Modeling | General model | Advertiser-specific model, more detailed |

Advanced mode sends requests to Google before any consent is given: this choice is as much a legal matter as a technical one. The banner, the rules of the CNIL (the French data protection authority) and this trade-off are covered in [handle applicable consent requirements](https://checklist-seo-geo.com/en/tracking-analytics-setup/handle-applicable-consent-requirements); this guide only covers wiring up the signals.

> **Warning:** Consent Mode is not GDPR compliance. It passes on a choice; it does not collect it, does not prove it and does not block any third-party script (Meta pixel, heatmap, video player).

## What it improves

- **Conversion measurement**: Google Ads models the conversions of visitors who decline cookies from the journeys of those who accept. Google sets a threshold of 700 ad clicks over 7 days, per country and domain grouping.
- **GA4 reports**: behavioral modeling fills in part of the unmeasured visits. It requires advanced mode, at least 1,000 events per day with `analytics_storage` denied for 7 days, and at least 1,000 daily users with consent granted on 7 of the last 28 days.
- **Audiences and remarketing**: when `ad_personalization` is denied, Google Ads remarketing receives no data. The signal must therefore be sent as “granted” as soon as the visitor accepts.
- **Rankings and citations in AI answers**: no effect. Neither Googlebot nor generative engines read these signals.

## How to check

**Tag Assistant.** Open Tag Assistant, enter the site's address and let the tab load.

1. In the summary, select the first “Consent” event. The `Consent` tab should show all four signals as `Denied` in the “On-page Default” column.
2. Accept in the banner, then select the last “Consent” event: the “On-page Update” column reflects your choice.
3. Do it again, this time declining.

An empty `Consent` tab means Consent Mode is not in place on the page.

**Network requests.** In the developer tools, Network tab, filter on `collect` and open a request to Google Analytics. Two parameters carry consent: `gcs` conveys the state of `ad_storage` and `analytics_storage`; `gcd` encodes the detail of the four signals and is always sent, whether Consent Mode is active or not. The value of `gcs` should change between declining and accepting.

> **Good to know:** Google does not publish the encoding of these parameters and warns that it may change. CMP vendors describe `G100` as “everything denied” and `G111` as “everything granted”.

Compliant result: a default state of denied before any tag, an update sent on the page where the choice is made, and the state restored on the following pages. The full method is in [check data collection](https://checklist-seo-geo.com/en/tracking-analytics-setup/check-data-collection).

## How to implement

### Before you start

Three decisions come before the code:

- **The mode**, basic or advanced, approved by your legal counsel or your data protection officer.
- **The banner.** A Google-certified CMP handles Consent Mode for you and keeps up with its changes. It is mandatory if you serve personalized ads with AdSense, Ad Manager or AdMob in the EEA, the United Kingdom or Switzerland; for GA4 and Google Ads alone, a custom-built banner is fine if it sends all four signals.
- **The mapping** between the banner's purposes and the signals. A common example, to be validated: “Analytics” drives `analytics_storage`; “Advertising” drives `ad_storage`, `ad_user_data` and `ad_personalization`.

### Google tag (gtag.js) installed by hand

Place the default state in the `<head>`, before the Google tag and before any `config` or `event` command:

```html
<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',
    'wait_for_update': 500
  });
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>
```

`wait_for_update` gives a banner loaded asynchronously 500 milliseconds to pass on a choice it has already stored. Then call the update in your banner's callback, on every choice and every change of mind:

```js
function transmettreConsentement(choix) {
  gtag('consent', 'update', {
    'analytics_storage': choix.mesure ? 'granted' : 'denied',
    'ad_storage': choix.publicite ? 'granted' : 'denied',
    'ad_user_data': choix.publicite ? 'granted' : 'denied',
    'ad_personalization': choix.publicite ? 'granted' : 'denied'
  });
}
```

Store the choice (first-party cookie or `localStorage`) and send it again at the start of every page, otherwise the state goes back to “denied”.

Two options:

- **By region**: add `'region': ['FR', 'BE']` (ISO 3166-2 codes) to a first `default` call, then make a second call without `region` for the rest of the world. The most specific region wins.
- **Redaction**: `gtag('set', 'ads_data_redaction', true)` redacts ad click identifiers in requests when `ad_storage` is denied.

In basic mode, the first block is not enough: only insert the `gtag/js` tag after the visitor has chosen.

### Google Tag Manager

1. `Admin > Container Settings > Additional Settings`: tick “Enable consent overview”.
2. Add your CMP's tag template from the Community Template Gallery. These templates use the `setDefaultConsentState` and `updateConsentState` APIs, which Google recommends in a container over `gtag('consent', …)`, sometimes processed too late.
3. Fire this tag on **Consent Initialization - All Pages**, which runs before every other trigger, including “Initialization”.
4. Google tags (Google tag, Google Ads, Floodlight) have built-in consent checks: do not add anything to them. For the others, in `Advanced Settings > Consent Settings`, require the relevant type (`ad_storage` for an advertising pixel).
5. Preview all three journeys in Tag Assistant, then publish.

In basic mode, Google tags fire on the acceptance event pushed by the CMP, not on “All Pages”.

### WordPress

Versions: WordPress 6.4 and later; Site Kit by Google, WP Consent API, Complianz, CookieYes and Cookiebot in their November 2026 versions.

The path depends on what inserts the Google tag.

- **Site Kit**: `Site Kit > Settings > Admin Settings`, turn on consent mode. Site Kit then sets the default state for visitors from the EEA, Switzerland and the United Kingdom, and waits for the choice passed on by the WP Consent API plugin. You therefore also need a compatible banner plugin: Site Kit's documentation mentions Complianz, CookieYes and Cookiebot.
- **Tag Manager**: turn on Consent Mode in the banner plugin or use its GTM template, not both.
- **Tag pasted into the theme**: apply the gtag.js section, with the default state placed before the tag.

### Shopify

Versions: Shopify admin, all plans, November 2026; Customer Privacy API 1.0.

Shopify centralizes consent in `Settings > Customer privacy` and exposes it to scripts through the Customer Privacy API. Three cases:

- **Native banner and the Google & YouTube channel**: according to Shopify's help center, correctly configured privacy settings are enough for consent to reach Google.
- **Third-party CMP**: it must be connected to Shopify's privacy settings, that is, call `setTrackingConsent` from the Customer Privacy API. Otherwise the pixels managed by Shopify ignore the choice.
- **Custom pixel** (`Settings > Customer events`): Shopify states that you have to insert the Consent Mode code into it yourself.

Example for a custom pixel, to be placed before the Google tag loads (the mapping of purposes is to be validated):

```js
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

function versGoogle(etat) {
  return {
    'analytics_storage': etat.analyticsProcessingAllowed ? 'granted' : 'denied',
    'ad_storage': etat.marketingAllowed ? 'granted' : 'denied',
    'ad_user_data': etat.marketingAllowed ? 'granted' : 'denied',
    'ad_personalization': etat.marketingAllowed ? 'granted' : 'denied'
  };
}

gtag('consent', 'default', versGoogle(init.customerPrivacy));

api.customerPrivacy.subscribe('visitorConsentCollected', (event) => {
  gtag('consent', 'update', versGoogle(event.customerPrivacy));
});
```

### Other platforms

On other CMSs and frameworks, the principle is that of the gtag.js section: default state first in the `<head>`, then the CMP, and the Google tag last. The loading order specific to each platform is described in [handle applicable consent requirements](https://checklist-seo-geo.com/en/tracking-analytics-setup/handle-applicable-consent-requirements).

## Common mistakes

- **Default state set after the tag**: the first events are sent with no state, or with a granted state.
- **Two signals instead of four**: an integration that predates November 2023 only sends `ad_storage` and `analytics_storage`.
- **Update sent too late**: it must be sent on the page where the choice is made, before any page change.
- **Choice not restored** on the following pages: every page starts again at “denied”.
- **Assuming other tools are covered**: Matomo, Plausible and the Meta pixel ignore Consent Mode.

## Frequently asked questions

### Is Consent Mode v2 mandatory?

Consent Mode v2 is not a legal obligation: it is a Google requirement. Google's consent policy covers visitors from the European Economic Area, the United Kingdom and Switzerland, and Google asks advertisers to pass this consent on to it in order to use ad measurement, ad personalization and remarketing. A site with no Google tag is not affected.

### Is Consent Mode enough to be GDPR compliant?

No. Consent Mode passes on to Google tags a choice the visitor has already made; it does not collect that choice, keeps no proof of it and does not block any script from another vendor. Compliance depends on the banner, the information given, the ability to decline as easily as to accept, and trackers actually being blocked before consent.

### Do I need to set up Consent Mode with Matomo?

No. Consent Mode only concerns Google tags: Google Analytics 4, Google Ads, Floodlight. Matomo, Plausible or any other tool without a Google tag does not read these signals and handles consent with its own methods. If the site combines Matomo and Google Ads, Consent Mode is still needed for Google.

### Does Consent Mode v2 have any effect on SEO?

None. Consent Mode v2 governs what Google tags measure about visitors; crawlers do not read these signals, and they play no part in rankings or in the answers of generative engines. Its value lies in keeping usable data in GA4 despite visitors declining cookies.

## Resources

- [Google: Consent mode overview, basic and advanced](https://developers.google.com/tag-platform/security/concepts/consent-mode?hl=en)
- [Google: Set up consent mode on websites](https://developers.google.com/tag-platform/security/guides/consent?hl=en)
- [Google: Troubleshoot consent mode with Tag Assistant](https://developers.google.com/tag-platform/security/guides/consent-debugging?hl=en)
- [Google: Consent APIs for Tag Manager templates](https://developers.google.com/tag-platform/tag-manager/templates/consent-apis?hl=en)
- [Tag Manager Help: Consent settings](https://support.google.com/tagmanager/answer/10718549?hl=en)
- [Tag Manager Help: Updates to consent mode for traffic in the EEA](https://support.google.com/tagmanager/answer/13695607?hl=en)
- [Google: EU user consent policy](https://www.google.com/about/company/user-consent-policy/)
- [Google Analytics Help: Behavioral modeling](https://support.google.com/analytics/answer/11161109?hl=en)
- [Google Ads Help: Conversion modeling with consent mode](https://support.google.com/google-ads/answer/10548233?hl=en)
- [AdSense Help: Certified CMP requirement](https://support.google.com/adsense/answer/13554116?hl=en)
- [Site Kit: Consent mode](https://sitekit.withgoogle.com/documentation/using-site-kit/consent-mode/)
- [Shopify: Customer Privacy API](https://shopify.dev/docs/api/customer-privacy)
- [Shopify Help Center: Customer privacy settings](https://help.shopify.com/en/manual/privacy-and-security/privacy/consent)

Next steps: [check data collection](https://checklist-seo-geo.com/en/tracking-analytics-setup/check-data-collection), [document the limits of attribution](https://checklist-seo-geo.com/en/tracking-analytics-setup/document-limits-attribution) and [test before and after cookie consent](https://checklist-seo-geo.com/en/performance-core-web-vitals/test-before-after-cookie-consent).
