# Consent

How Zernio's tracking tag reads your visitors' consent, what it sends with and without it, and how to change the default for visitors who made no choice.

The tracking tag follows each visitor's consent. A visitor who refuses ad storage is still counted on your site, but nothing about them reaches an ad platform.

## Read from your consent banner

The tag reads Google Consent Mode v2 from your page's `dataLayer`, both `default` and `update`, region defaults included. Most consent banners set it, so they need no extra work.

Without Consent Mode, pass the visitor's choice yourself with the same three fields:

```js
zernio('consent', { ad_storage: 'granted', ad_user_data: 'granted', ad_personalization: 'denied' });
```

## What each choice changes

| The visitor | Stored in Zernio | Sent to ad platforms |
|---|---|---|
| Grants `ad_storage` | The conversion, with click ids and identifiers | Yes |
| Denies `ad_storage` | The conversion, with no identifiers | No |
| Denies `ad_user_data` | As granted | Yes, with less personal data, per [each platform's rules](/products/conversions-api/platforms#test-mode-and-consent) |
| Turns consent off later | From then on, as denied | The tag forgets the ids it kept |

## When the visitor made no choice

`consentMode` on the site decides:

| `consentMode` | No choice yet means |
|---|---|
| `eu_opt_in` (default) | No consent in the EU, UK and other countries that require it, and where the country is unknown; consent elsewhere |
| `opt_in` | No consent anywhere |
| `opt_out` | Consent everywhere |

Change it with `PATCH /v1/tracking-sites/{siteId}`:

```bash
curl -X PATCH "https://zernio.com/api/v1/tracking-sites/6a2b3c4d5e6f7a8b9c0d1e2f" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "consentMode": "opt_in" }'
```

## How it behaves

- **Choices win.** A Consent Mode signal or a `consent` call always beats `consentMode`.
- **Expect fewer European conversions.** Under `eu_opt_in`, visitors who ignore the banner are counted in Zernio but not sent.
- **Bots are never sent**, whatever their consent.

## Related

- [The tracking script](/products/server-side-tracking/script)
- [Server-side tracking](/products/server-side-tracking)
- [Platforms: test mode and consent](/products/conversions-api/platforms#test-mode-and-consent)