# Consent mode

Also called: Google consent mode, consent mode v2, basic consent mode, advanced consent mode

Consent mode is a Google feature that passes a visitor's cookie choices from your consent banner to Google tags such as Google Analytics and Google Ads, which then change how they behave. It does not show a banner or collect consent itself; it only relays the answer your banner got.

## How it is calculated

Your page sets a default state before any Google tag runs, then updates it when the visitor answers the banner. Since the November 2023 update (consent mode v2) it has four parameters, each `granted` or `denied`, per Google's [developer guide](https://developers.google.com/tag-platform/security/guides/consent): `ad_storage` (advertising cookies), `analytics_storage` (analytics cookies), `ad_user_data` (sending user data to Google for advertising) and `ad_personalization` (personalised ads).

Google's [help page](https://support.google.com/google-ads/answer/10000067) describes two ways to run it. In **basic** consent mode the tags do not load until the visitor accepts, and nothing is sent before that. In **advanced** consent mode the tags load at once with the defaults, and while consent is denied they send cookieless pings that Google uses to model the conversions it cannot observe.

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

## Example

A shop gets 10,000 EU visitors in a week and 6,000 accept the banner. With basic consent mode, Google Analytics records the 6,000 and nothing about the other 4,000. With advanced consent mode, the 4,000 also send cookieless pings, and Google may fill part of the gap with modelled figures, so reported users can land above 6,000. Neither setup counts the 4,000 as observed visitors.

## Common mistakes

- Thinking consent mode makes Google Analytics compliant on its own. It only passes on a choice; you still need a lawful banner and a legal basis.
- Setting the default after the Google tag has already fired. Google's guide says the default call has to come before any config or event commands.
- Reading modelled numbers as measured ones. Advanced mode estimates part of the denied traffic.

## How CrispStats shows it

CrispStats has no consent mode because it has nothing to switch: it sets no cookies, writes nothing to the device by default and stores no IP addresses or raw user agents, so every visitor is counted the same way whatever they choose on a banner. Whether your site needs a banner at all is a legal question for your own setup. The one exception is the opt-in persistent visitor mode, which writes an id to localStorage: if you use it, gate that script behind the banner's answer the way consent mode gates Google tags.

## Related terms

- [Cookie consent](/glossary/cookie-consent)
- [ePrivacy Directive](/glossary/eprivacy-directive)
- [GDPR](/glossary/gdpr)
- [First-party cookie](/glossary/first-party-cookie)
- [Third-party cookie](/glossary/third-party-cookie)
- [Cookieless tracking](/glossary/cookieless-tracking)
