# Cookies and data

Every cookie and browser storage key the tracking tag uses, what Zernio stores about your visitors, how long it keeps it and what it never stores.

What the tracking tag writes in your visitors' browsers and what Zernio keeps. Use it for your cookie banner and privacy policy.

## Cookies

The collector sets these only when it runs on [your own subdomain](/products/server-side-tracking/custom-subdomain), as first-party cookies on your domain. On Zernio's default host it sets none.

| Cookie | Purpose | Lasts |
|---|---|---|
| `_zid` | A random id for the visitor | 400 days |
| `_zs` | The visit, so page views group into sessions | 30 minutes |
| `_zc` | The visitor's ad click ids, signed so they cannot be forged | 400 days, renewed each visit |

When a visitor returns without an ad platform's own cookie, the collector writes it back from `_zc`, for 90 days. These belong to the ad platforms' pixels:

| Cookie | Platform |
|---|---|
| `_fbp`, `_fbc` | Meta |
| `_gcl_aw`, `_gcl_gb` | Google Ads |
| `_ttp` | TikTok |
| `li_fat_id` | LinkedIn |
| `_epik` | Pinterest |
| `_rdt_uuid` | Reddit |
| `__oppref` | OpenAI Ads |

All of them are `Secure` and `SameSite=Lax`. `_zid` and `_zc` are `HttpOnly`, so page scripts cannot read them.

The tag also sets `_zid` itself on any host, for 400 days, so your server can [join backend events to the visit](/products/server-side-tracking/backend-events). Where the collector sets it, the browser keeps that copy.

## Browser storage

The tag also keeps a few values in the site's `localStorage`:

| Key | Holds |
|---|---|
| `_zid` | The visitor id |
| `_zs` | The current visit |
| `_zclk` | Ad click ids from the landing page |
| `_zutm` | UTM tags from the landing page, for 30 days |
| `_zq` | Events waiting to be sent |
| `_zst` | Whether the collector allowed storage for this visitor |

## Consent and storage

Without ad storage consent, the tag writes nothing to the browser and the collector sets no cookie. On withdrawal, the tag clears its keys and `_zid` cookie, and the collector expires `_zid`, `_zs` and `_zc`.

The ad platforms' own cookies are left alone: their pixels write them too.

## What Zernio stores

| Data | Kept for |
|---|---|
| Each page view and event: page, referrer, UTM tags, country, device, consent | 90 days |
| Daily totals per site | 400 days |
| Conversions, as events with source `web` | Like every [stored event](/products/conversions-api) |
| Hashed email, phone and external id of identified visitors, to match their later orders | Used for 180 days after last seen, deleted after 400 |

## What Zernio never stores

- **IP addresses and user agents.** They travel with a conversion to the ad platforms that ask for them, and are dropped once it is sent.
- **Plain email, phone or external id.** They are hashed with SHA-256 before they are stored or leave Zernio.
- **Anything from bots.** Bot visits are counted, never sent.

## How it behaves

- **No third-party cookies.** Every cookie is set on your own domain.
- **Your data, your ad accounts.** Events go only to the ad accounts you switched on.
- **Deleting a site** stops collection at once. Its stored page views expire within 90 days.

## Related

- [Consent](/products/server-side-tracking/consent)
- [Use your own subdomain](/products/server-side-tracking/custom-subdomain)
- [Platforms: customer identifiers](/products/conversions-api/platforms#customer-identifiers)