# Do you need a cookie banner for analytics?

The CrispStats team · Published 2026-11-16 · Updated 2026-11-29

**TL;DR:** It depends on what your analytics does on the visitor's device and where your visitors are. In the EU and UK, storing or reading information on a device (cookies, localStorage and similar) generally needs consent unless it is strictly necessary, and analytics is rarely treated as necessary. Tools that store nothing on the device are widely argued to fall outside that rule, but regulators differ and data protection law still applies. This is general information, not legal advice.

> **Not legal advice.** This article explains the general shape of the rules so you can ask better questions. It is not legal advice, it does not cover every country, and the details change. Decisions about consent on your site belong with you and a qualified adviser.

The honest answer to the title is "it depends", but it depends on a small number of things you can check. Most of the confusion comes from treating two different rules as one, and from the word "cookie" itself.

## Which rules are we talking about?

In the EU and the UK there are two layers, and they ask different questions.

### The device rule

The ePrivacy Directive in the EU, implemented in each member state's own law, and PECR in the UK say roughly this: storing information on a person's device, or reading information already stored there, needs their consent first, unless it is strictly necessary to provide a service they asked for.

Notice what the rule is about. It is not about cookies as such. It covers cookies, localStorage, sessionStorage, IndexedDB and any other way of keeping or reading something on the device. Swapping a cookie for a localStorage entry changes nothing. This is the rule that [cookie consent](/glossary/cookie-consent) banners exist to satisfy.

### The data protection rule

GDPR, and the UK's version of it, is separate. It applies whenever personal data is processed, with or without anything stored on a device. Personal data is read broadly: an IP address or an online identifier can qualify. GDPR does not always require consent, but it does require a lawful basis, a clear privacy notice, limits on what you keep and for how long, and a contract with any vendor that processes the data for you.

A tool can avoid the first rule and still be covered by the second. Keep them apart in your head and most vendor claims become easier to evaluate.

## Does cookie-based analytics need consent?

In the EU and UK, generally yes. A script that writes an identifier to a cookie is storing information on the device, and regulators have not usually accepted analytics as "strictly necessary" in the way a shopping basket or a login session is. That is why sites using cookie-based analytics show a banner and should only load the script after the visitor agrees.

Some national regulators have described narrow exemptions for simple, first-party audience measurement under strict conditions: France's CNIL and Spain's AEPD among them, and the UK added a statistical purposes exception in 2025. Germany's authorities decline to give a general exemption, and Ireland's says analytics cookies need consent. Our [country-by-country summary](/blog/analytics-and-consent-in-europe) links each source; if you are relying on an exemption, read the guidance itself, not a summary of it.

## Does cookieless analytics need consent?

[Cookieless tracking](/glossary/cookieless-tracking) is designed to stay outside the device rule: the script stores nothing and reads nothing from storage. It sends the page address and referrer, and the server counts visitors with a short-lived hash (the mechanics are in [cookieless analytics explained](/blog/cookieless-analytics-explained)).

The common reading is that this does not trigger the device rule, since nothing is stored or accessed on the device. Many site owners run such tools without a consent banner on that basis.

Three cautions before you do the same:

- **Regulators differ.** National authorities interpret the device rule with different breadth, and some guidance reads "gaining access to information" widely enough to reach techniques beyond cookies. A position that is comfortable in one country may be questioned in another.
- **GDPR still applies.** Even with no storage, the server sees an IP address for a moment. You still need a lawful basis (many sites rely on legitimate interests for privacy-preserving statistics), a line in your privacy policy, and a data processing agreement with the vendor.
- **"Cookieless" is a label, not a guarantee.** Check what the tool actually does. Device fingerprinting stores nothing either, and regulators generally treat it like a cookie or worse.

## What else on your site might need a banner?

This is the part people miss. Removing cookies from analytics only removes the banner if analytics was the only reason for it. Open your browser's developer tools, load your site in a private window, and look at what gets stored before you click anything. Common sources:

- Advertising and retargeting pixels.
- Embedded video players and social media embeds.
- Live chat and support widgets.
- A/B testing, heatmap and session replay scripts.
- Embedded maps, booking forms and comment systems.
- Tag managers, which may load any of the above.

If any of these store non-essential data on the device, you need consent for them whatever your analytics does. The usual options are to remove them, replace them with versions that store nothing, or load them only after a click.

## A rough guide by situation

| Your setup | Device rule (EU and UK) | What to do |
| --- | --- | --- |
| Analytics that sets cookies or uses localStorage ids | Generally needs consent | Show a banner and load the script only after agreement |
| Analytics that stores nothing on the device | Widely argued to fall outside it; regulators differ | Check your country's guidance, document your reasoning, cover it in your privacy policy |
| Cookieless analytics plus ad pixels, chat or embeds | Consent needed for the other tools | Keep a banner for those, or remove them |
| Fingerprinting-based tracking | Generally treated like cookies | Assume consent is needed |
| Strictly necessary storage only (login, basket, language) | Exempt | No consent needed for those, but describe them in your policy |

Outside Europe the picture varies again. Many US state privacy laws, for example, centre on notice and the right to opt out of selling or sharing data rather than on prior consent for analytics. If you have visitors in several regions, the strictest one that applies to you usually sets your baseline.

## Questions to ask before you decide

1. Does the analytics script write to or read from cookies, localStorage or any other storage on the device? Test it; do not rely on the marketing page.
2. Does it build an identifier from device characteristics? If so, treat it as fingerprinting.
3. What does the vendor store on its servers: IP addresses, user agents, persistent ids? For how long?
4. Can one visitor be followed across days, or across different websites?
5. Is the vendor your processor under a data processing agreement, and where is the data processed?
6. What other scripts on the site store data on the device?
7. Which countries are your visitors in, and what does the regulator there say about audience measurement?
8. Does your privacy policy describe the analytics you actually run?
9. If you turn on an optional feature later (persistent ids, user identification), does the answer change?

Write the answers down. A short record of what you checked and why you decided as you did is useful if anyone asks, and it makes the next review quick.

## How CrispStats is built

Here are our answers to the questions above, so you can check them rather than take a label on trust. Question 1: no cookies, and nothing read from or written to device storage by default. Question 2: no device fingerprint; the identifier is a hash of a daily secret, the site, the IP address and the user agent. Question 3: neither the IP address nor the raw user agent is stored, only the hash. Question 4: the secret rotates daily and the site is in the hash, so no one is followed across days or websites. Question 5: yes, a [data processing agreement](/legal/dpa) is published, and the privacy policy below names the storage region.

Question 9 is where the answer can change: the optional persistent visitors mode. It stores a random id in localStorage so returning visitors are recognised across days. That is storage on the device, so it should only be enabled with the visitor's consent. It is off unless you turn it on.

The [cookie policy](/legal/cookies) lists what is and is not stored, and the [privacy policy](/legal/privacy) covers the rest. Whether your site can run without a banner depends on everything else in this article, so check it for your own situation. [Analytics without a cookie banner](/analytics/no-cookie-banner-analytics) sets out what that takes on the analytics side.

## Is the banner about the analytics script or about the page?

The banner is about the page. It records consent before something non-essential is stored on the device, or read from it, whichever script does that. The analytics script is one script on the list. If it writes a cookie or other storage, it is one reason for the banner. If it stores nothing, it leaves the list, and the banner stays for every script that remains.

The list earlier in this article is the practical version: advertising scripts, video, chat, heatmaps, session replay, maps and a tag manager. Gating only the analytics tag does not answer those. A national exemption for audience measurement, where one exists, is also about that measurement. It is not a pass for the rest of the page. Country texts are in [analytics and consent in Europe](/blog/analytics-and-consent-in-europe).

This is general information, not legal advice. Your own adviser decides for the scripts the page loads.

## What does a cookieless analytics script change about the banner?

It can remove analytics as a reason for storage. It does not decide the banner, because the banner was never only about that script. It also does not mean the visit is anonymous in every law. The data protection rule further up still applies, and an IP address can be personal data for the moment it is processed. The definitions are in [PII examples](/blog/pii-examples-in-analytics).

Cookieless advertising is a different job from that script. Measuring or targeting ads often means a shared identifier across sites, which is a common reason a banner remains. This article does not explain how to run ads. The counting method is in [cookieless analytics explained](/blog/cookieless-analytics-explained), and the other methods are in [cookieless tracking](/blog/cookieless-tracking-explained).

Consent mode does not settle the banner either. It passes a choice to Google tags. Version 2 adds two advertising signals, ad_user_data and ad_personalization, so Google can be told whether it may use data for advertising and for personalised ads. It does not inspect the other scripts on your page. The [consent mode guide](/blog/google-consent-mode-explained) has the detail. [Cookieless analytics](/analytics/cookieless-analytics) and [GDPR-compliant analytics](/analytics/gdpr-compliant-analytics) describe the analytics side.

## Frequently asked questions

### Is a cookie banner required if I do not use cookies?

The rule in the EU and UK covers any storing or reading of information on the device, not only cookies, so localStorage ids count too. If nothing is stored or read, the consent rule is widely argued not to apply, but regulators differ by country and data protection law still applies. Check your own situation with an adviser.

### Does GDPR require consent for analytics?

Not necessarily. GDPR requires a lawful basis for processing personal data, and consent is one of several. The separate device storage rule is what usually makes consent necessary for cookie-based analytics. Which basis fits your analytics depends on what data is processed and how.

### If I switch to cookieless analytics, can I remove my banner?

Only if nothing else on the site needs it. Ad pixels, embedded videos, chat widgets and similar tools often store data on the device and need consent on their own. Audit everything the site loads before removing a banner.

### Is this legal advice?

No. It is general information to help you understand the questions involved. Rules differ between countries and change over time, so take decisions about consent with a qualified adviser.

### Is a cookie banner for the analytics script or for other scripts?

It is for the page. Any script that stores or reads non-essential information on the device can be a reason for it, including advertising, video, chat and tag managers. A cookieless analytics script can remove analytics from that list. It does not remove the others. This is general information, not legal advice.

### Does cookieless analytics mean I no longer process personal data?

No. Cookieless means the script does not store an identifier on the device. Data protection law can still apply to an IP address and to other data the server processes. Whether your setup is lawful is for you and your adviser.
