> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# Cookieless counting and consent

> The tag counts without cookies until a visitor agrees. How consent works, from your banner or your code.

Updated: 2026-11-18

By default, the tag doesn't wait for your cookie banner to start counting, and it doesn't need cookies to do it. Until a visitor agrees, it counts **cookieless**: it sends page views and events, but keeps nothing on the device across visits and identifies nobody. A visitor is counted with a code that changes every day.

Here's what changes when they say yes, and how to tell the tag.

## What changes after consent?

| | Before consent | After a yes |
| --- | --- | --- |
| Page views and events | Sent | Sent |
| Kept on the device | Nothing across visits (the visit lives in the tab only) | A first-party id, `na_id`, on your site's domain, for 13 months ([subdomains, domains and Safari](/docs/tracking/cross-domain)) |
| Same person on two days | Counted twice | Counted once |
| `identify`, `group`, `setPersonProperties` | Do nothing | Work |

A no removes everything the tag kept in the tab, on the device and in its cookie. A browser sending Global Privacy Control always counts as no.

## What about Do Not Track and Global Privacy Control?

A visitor whose browser sends **Do Not Track** or **Global Privacy Control** isn't recorded at all, even after `consent(true)`. Their visits don't appear in your numbers.

## How do you tell the tag the answer?

From your code, where your banner's answer is handled:

```js
window.nextanalytica.consent(true);   // the visitor agreed
window.nextanalytica.consent(false);  // the visitor said no
```

## Can the tag wait for consent instead?

Yes. To send nothing at all until a yes, add `data-cookieless="off"` to the line:

```html
<script async src="https://t.nextanalytica.app/t.js" data-project="na_…" data-cookieless="off"></script>
```

Events then wait in memory, never on the device, and go when the visitor agrees.

> **Note:** Whether you need consent depends on where your visitors are and what you do with the data. You decide; the [Privacy](https://nextanalytica.app/privacy) page says what we do.

Canonical address: https://nextanalytica.app/docs/tracking/cookieless-and-consent
