[invisit](https://invisit.dev) · [Docs](https://invisit.dev/docs) · [llms.txt](https://invisit.dev/llms.txt) · [llms-full.txt](https://invisit.dev/llms-full.txt)

# Do you need a cookie banner for analytics? EU, UK and US in 2026

> What EU, UK and US law says about analytics cookies and cookieless tracking as of November 2026, with a setup-by-setup table and a checklist.

- Author: Miraç Berk
- Published: 2026-11-03
- Page: https://invisit.dev/blog/cookie-banner-analytics
- Tags: privacy, gdpr, cookies

![A soft 3D cookie beside a half-closed consent banner on a browser window, with violet dithered light and shadows.](https://invisit.dev/_astro/cover.BxNTqPLM.png)

In the EU and the UK, analytics that store or read information on a visitor's device need consent unless an exemption for audience measurement applies, and regulators disagree on how far that exemption reaches for cookieless tools. In the US, no general law requires a cookie banner for analytics: you need a privacy policy, plus an opt-out that honours Global Privacy Control if your analytics sell or share personal data.

Below are the rules as of November 3, 2026, from the laws and regulators themselves. We build invisit, a cookieless analytics tool, so we have a stake; where invisit's position is uncertain, we say so.

> [!NOTE]
> This is not legal advice. Your country, your exact tags and what you do with the data decide the answer. For anything with real exposure, ask a lawyer or your data protection officer.

## The short answer for the EU, the UK and the US

|                         | EU                                                           | UK                                                     | US                                             |
| ----------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | ---------------------------------------------- |
| The rule                | ePrivacy Directive Article 5(3), in each country's law       | PECR regulation 6, rewritten from February 5, 2026     | No cookie consent rule; state privacy laws     |
| What triggers it        | Storing or reading information on the device, any technology | The same, plus collecting information the device emits | Selling or sharing personal data, targeted ads |
| Consent-free analytics? | Not in the Directive; France exempts it under limits         | Yes, for statistics, with notice and a way to object   | Yes; opt-outs and a privacy policy instead     |

## What does EU law say about analytics cookies?

EU law makes consent the default for any analytics that touch the visitor's device, and analytics is not one of its exemptions. [Article 5(3) of the ePrivacy Directive](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02002L0058-20091219) allows "the storing of information, or the gaining of access to information already stored, in the terminal equipment of a subscriber or user" only with consent, after "clear and comprehensive information".

The only exemptions are transmitting a communication and what is "strictly necessary" for a service the user "explicitly requested". The rule covers any information, not only personal data.

In [Opinion 04/2012](https://ec.europa.eu/justice/article-29/documentation/opinion-recommendation/files/2012/wp194_en.pdf), the EU's data protection regulators found that first-party analytics cookies "are not exempt from consent but pose limited privacy risks", and suggested lawmakers add an exemption. The Directive still has none.

When analytics process personal data, the GDPR applies on top: a lawful basis, a privacy notice and a processing agreement with your vendor. An IP address can be personal data in a website operator's hands.[^breyer]

## Does cookieless analytics need consent in the EU?

Cookieless analytics is not automatically exempt in the EU. The European Data Protection Board's [Guidelines 2/2023 on the technical scope of Article 5(3)](https://www.edpb.europa.eu/documents/guideline/guidelines-22023-on-technical-scope-of-art-53-of-eprivacy-directive_en), final version 2.0 adopted on October 7, 2024, read the rule as covering far more than cookies:

- Scripts: JavaScript that "instructs the browser of the user to send asynchronous requests with the targeted information" is access that "clearly falls within the scope" (paragraph 33).
- Pixels and tracking links: sending them counts as storage, at least through the browser cache, and collecting the identifiers they carry is gaining access (paragraphs 50 and 51).
- IP addresses: tracking based on the IP address alone "could" fall under Article 5(3). A home router's static IPv4 address and IPv6 addresses originate from the user's equipment, and "unless the entity can ensure that the IP address does not originate from the terminal equipment", the rule applies (paragraphs 54 and 55).

The EDPB leaves exemptions to national regulators, noting that falling under Article 5(3) "does not systematically mean that consent needs to be collected" (paragraph 56). So a cookieless script is still inside the rule, and the banner question becomes whether your country exempts audience measurement.

## Which EU countries exempt analytics from consent?

France exempts audience measurement from consent under strict conditions; Germany's regulators decline to say it is exempt in general.

The [CNIL's audience measurement page](https://www.cnil.fr/fr/cookies-solutions-pour-les-outils-de-mesure-daudience), dated July 4, 2025, exempts trackers used only to measure the site's audience on behalf of the publisher alone, producing anonymous statistics only, never cross-referenced with other processing or passed to third parties in non-anonymous form, and never following a person across sites or apps. It recommends telling users in your privacy policy, a tracker lifetime such as 13 months that does not extend on each visit, and keeping the data at most 25 months.

Its [July 2025 self-assessment grid](https://www.cnil.fr/sites/default/files/2025-07/outil_d_auto-evaluation_mesure_d_audience.pdf) is stricter than most founders expect. For a fingerprint-style visitor hash, it recommends mixing in something site-specific, such as the domain, and a time component. Its recommended measures also switch off UTM and campaign-ID collection, cut referrers to the domain, rule out following one visitor's navigation, and put an opt-out link in the privacy policy. Vendors may document alternatives, but may not call a tool "validated by the CNIL".

[Matomo's CNIL mode](https://matomo.org/faq/how-to/how-do-i-configure-matomo-without-tracking-consent-for-french-visitors-cnil-exemption/) shows the cost: it turns off the Visits Log, visitor profiles, User ID, heatmaps and session recordings, discards campaign parameters, masks three bytes of each IP address and deletes raw data after 744 days.

Germany's [section 25 of the TDDDG](https://www.gesetze-im-internet.de/ttdsg/__25.html) copies Article 5(3) almost word for word. Its regulators' [guidance for digital services](https://datenschutzkonferenz-online.de/media/oh/OH_Digitale_Dienste.pdf) (version 1.2, November 2024) refuses to call reach measurement exempt in general, because "even the simple measurement of visitor numbers" is not part of the basic service "per se" and depends on its purpose (paragraph 90, our translation). It treats reading device properties with JavaScript to build a fingerprint as access (paragraph 24). In Germany, consent-free analytics rests on your own documented argument.

## Is a daily rotating hash exempt from consent?

Regulators have not agreed on analytics that count visitors with a daily hash of the IP address and user agent:

| Source                                                                                                                                                                                                       | Position on hash-based counting                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| EDPB (EU)                                                                                                                                                                                                    | IP-based tracking can fall under Article 5(3); exemptions are for national regulators                                      |
| CNIL (France)                                                                                                                                                                                                | Usable for consent-free measurement, with the site and a time component in the hash, among the other conditions            |
| DSK (Germany)                                                                                                                                                                                                | Fingerprints built from JavaScript-read properties are access; no general exemption for reach measurement                  |
| [ICO](https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guidance-on-the-use-of-storage-and-access-technologies/what-are-storage-and-access-technologies/) (UK) | Fingerprinting, which can use HTTP headers and IP addresses, is covered wherever it accesses information on a device       |
| [Plausible](https://plausible.io/data-policy)                                                                                                                                                                | Hashes a daily salt, domain, IP and user agent, deletes the salt every 24 hours, and says you "do not need cookie banners" |
| [Simple Analytics](https://docs.simpleanalytics.com/explained/unique-visits)                                                                                                                                 | IP hashes combined with dates are "still considered fingerprinting and requires consent under GDPR and PECR"               |

Vendors describe their own products, so weigh the regulators first. Either way, a daily hash keeps you inside the GDPR: [Fathom's documentation](https://usefathom.com/docs/troubleshooting/cookies) says it processes "personal data (IP Address and User-Agent)" for its customers.

## What changed for analytics cookies in the UK in 2026?

Since February 5, 2026, UK sites can use cookies and similar technologies for analytics without consent, if the analytics are statistical, aimed at improving the site, and visitors are told and can object. [Section 112](https://www.legislation.gov.uk/ukpga/2025/18/section/112) of the Data (Use and Access) Act 2025, brought into force by S.I. 2026/82, rewrote PECR regulation 6 and added [Schedule A1](https://www.legislation.gov.uk/uksi/2003/2426/schedule/A1). Its paragraph 5 allows storage or access when:

1. its sole purpose is to collect information "for statistical purposes" about how the service or website is used, "with a view to making improvements";
2. the information is shared only with someone helping you make those improvements;
3. visitors get "clear and comprehensive information" about the purpose;
4. visitors have "a simple means of objecting, free of charge", and do not object.

[Regulation 6](https://www.legislation.gov.uk/uksi/2003/2426/regulation/6) now also covers "collecting or monitoring information automatically emitted by the terminal equipment", and paragraph 5(2) keeps that kind of collection out of the statistics exception.

The ICO finalised its [storage and access guidance](https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guidance-on-the-use-of-storage-and-access-technologies/) on April 29, 2026. Its [exceptions chapter](https://ico.org.uk/for-organisations/direct-marketing-and-privacy-and-electronic-communications/guidance-on-the-use-of-storage-and-access-technologies/what-are-the-exceptions/) says the exception is about "how your service is used, not about who uses it":

- Likely covered: visits page by page, scroll depth, device types, referrers and campaigns, A/B tests, city-level location, load speed.
- Not covered: "logs or recordings of individual visitors to your website and the actions they took", advertising measurement, conversions tied to a visitor ID for ad partners, profiling by IP address, and keeping individual-level information after aggregating it.
- The objection can be an analytics toggle, on by default, in your consent tool. Once someone objects, you stop.

The ICO's only example of "automatically emitted" information is wifi probe requests. Whether the IP address and user agent of an ordinary page request count is not settled, and that decides how comfortably a hash-based tool fits the exception.

## Will the EU drop cookie banners for analytics?

Not yet. As of November 2026 an EU analytics exemption is still a proposal, and the current rules apply in full.

The European Commission's [Digital Omnibus proposal](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=celex%3A52025PC0837) of November 19, 2025 would exempt "creating aggregated information about the usage of an online service to measure the audience of such a service, where it is carried out by the controller of that online service solely for its own use". On October 21, 2026 the [Council agreed its position](https://www.consilium.europa.eu/en/press/press-releases/2026/10/21/digital-rulebook-council-agrees-position-to-simplify-data-protection-privacy-and-cyber-reporting-rules/): the rules stay in the ePrivacy Directive, with added consent-free purposes including audience measurement. Negotiations start once the European Parliament adopts its position; its committees had not voted by late October 2026 ([Legislative Train](https://www.europarl.europa.eu/legislative-train/package-digital-package/file-digital-package)).

## Do US websites need a cookie banner for analytics?

No. No federal law, and none of the state privacy laws, requires opt-in consent before ordinary first-party analytics. US state laws work on opt-out: people can stop the sale or sharing of their data and targeted advertising, and several states require you to honour Global Privacy Control (GPC) as that opt-out.

- Who is covered: the CCPA applies to a for-profit business with revenue over $26,625,000, or that buys, sells or shares the data of 100,000 or more consumers or households, or makes half its revenue from selling or sharing it ([CPPA](https://cppa.ca.gov/pdf/business_comply.pdf)).
- When analytics become a sale: "sell" includes handing over data for "other valuable consideration". In 2022 [Sephora paid $1.2 million](https://oag.ca.gov/news/press-releases/attorney-general-bonta-announces-settlement-sephora-part-ongoing-enforcement) after California's Attorney General treated letting analytics and ad providers collect shopper data in exchange for their services as a sale, and found GPC ignored.
- When they are not: a vendor acting as your service provider. Google says Google Analytics is one when [data sharing with Google products and services is disabled](https://support.google.com/analytics/answer/6004245).
- GPC: a business that sells or shares must treat the signal as an opt-out for that browser and any pseudonymous profile tied to it, within 15 business days ([CPPA](https://cppa.ca.gov/pdf/oops.pdf)). Colorado has required it [since July 1, 2024](https://coag.gov/opt-out/), Connecticut since January 1, 2025, and California counts itself [one of a dozen states](https://privacy.ca.gov/2025/10/governor-signs-groundbreaking-privacy-bill-making-it-easier-for-californians-to-protect-their-personal-data/) with the requirement. The three ran a [joint GPC sweep](https://portal.ct.gov/ag/press-releases/2025-press-releases/connecticut-california-and-colorado-announce-joint-investigative-privacy-sweep) in September 2025.
- Coming next: from January 1, 2027, browsers in California must offer a setting that sends an opt-out signal ([AB 566](https://leginfo.legislature.ca.gov/faces/billNavClient.xhtml?bill_id=202520260AB566)).
- The privacy policy: [CalOPPA](https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=BPC&sectionNum=22575) requires one from commercial sites collecting personal information from Californians, saying how you respond to Do Not Track if you track people across other sites.

Sensitive data is different: Colorado, for one, requires [consent before processing it](https://coag.gov/resources/colorado-privacy-act/), and health and children's data have their own rules, not covered here.

## What each analytics setup needs in the EU, the UK and the US

| Setup                        | On the device                                            | EU                                        | UK                                           | US                                                |
| ---------------------------- | -------------------------------------------------------- | ----------------------------------------- | -------------------------------------------- | ------------------------------------------------- |
| GA4 with cookies             | `_ga` cookies kept 2 years                               | Consent                                   | Consent, as typically configured             | Privacy policy; opt-out and GPC if data is shared |
| GA4 with Consent Mode        | Basic: nothing until consent. Advanced: cookieless pings | Consent; the banner is still required     | Consent, as typically configured             | Same as GA4                                       |
| Cookieless, no identifier    | Script sends page and referrer; nothing stored           | Low risk; depends on the national reading | Statistics exception: notice and opt-out     | Privacy policy                                    |
| Cookieless, daily hash       | Nothing stored; server hashes IP and user agent daily    | Disputed; France allows it under limits   | Statistics exception if aggregate; unsettled | Privacy policy                                    |
| First-party analytics cookie | Visitor ID cookie, often a year or more                  | Consent, except France under its limits   | Statistics exception for aggregate use only  | Privacy policy; opt-out if data is sold or shared |

GA4 sets `_ga` and `_ga_<container-id>` for two years by default ([Google](https://support.google.com/analytics/answer/11397207)), and Google's [EU user consent policy](https://www.google.com/about/company/user-consent-policy/) makes you collect consent where the law requires it in the EEA, the UK and Switzerland. To use the UK statistics exception, a GA4 property would at least need Google signals, ads links and data sharing off, plus an objection control.

[Consent Mode](https://developers.google.com/tag-platform/security/concepts/consent-mode) changes what the tag does after the visitor chooses, not whether you ask. In basic mode, no tags load before the banner is answered. In advanced mode, denied visitors still send cookieless pings with the user agent, referrer and a random number per page load: a script making the browser send information, as in EDPB paragraph 33.

Simple Analytics decides visits from the referrer and keeps no identifier, the most conservative design here. Plausible and Fathom rotate their hash salt daily; [Umami](https://docs.umami.is/docs/metric-definitions) rotates its salt monthly by default, so a returning visitor stays linkable for up to a month. [DataFast's default script](https://datafa.st/docs/gdpr-cookieless-tracking) sets a `datafast_visitor_id` cookie for a year, and DataFast says you may need a banner for it.

## Does invisit need a cookie banner?

invisit sits in the daily-hash row, so the same country-by-country readings apply to it as to Plausible or Fathom. We do not claim it is exempt everywhere. What it does, checked against its code:

- It sets no cookies and stores nothing on an ordinary visitor's device. The only things it ever keeps there are a consent answer from your banner and a site owner's own opt-out; `storage: 'none'` keeps even those off.
- The server tells visitors apart with a keyed hash of your site, the date, the device, browser and operating system type, and the IP address. The date changes it every day, so nobody is followed across days, and raw IP addresses are never stored.
- With `respectGpc` or `respectDnt` turned on, browsers that send Global Privacy Control or Do Not Track are not measured at all, which goes further than US law asks.
- With `requireConsent`, nothing is sent until your banner grants consent. `consent('denied')` stops collection on that browser in any mode, so it can serve as the opt-out link ([privacy guide](https://invisit.dev/docs/guides/privacy.md#requiring-consent)).

```ts title="src/analytics.ts"
import { consent, init } from '@invisitdev/web'

init({ site: '<site id>' })

// The "stop measuring me" link in your privacy policy
export function optOutOfAnalytics(): void {
  consent('denied')
}
```

To ask first, start with `init({ site: '<site id>', requireConsent: true })` and call `consent('granted')` from your banner.

Where invisit fits less well:

- France: invisit records UTM campaigns, shows every visit step by step and attaches your user ids through `identify()`, features the CNIL grid switches off, and it has no CNIL mode. For consent-free measurement of French visitors, Matomo's CNIL mode fits better; with invisit, use `requireConsent`.
- UK: the ICO puts "logs or recordings of individual visitors" outside the statistics exception. If your assessment treats invisit's script as access to the device, its visit timelines strain that exception, and `requireConsent` is the conservative choice.
- Retention: invisit keeps analytics data until you delete the site; the CNIL recommends 25 months at most.

## Checklist: privacy policy, banner or neither

- [ ] List every tag on your site: analytics, ad pixels, chat widgets, embeds. One pixel that needs consent keeps the banner.
- [ ] In the privacy policy, name the analytics tool and say what it collects, whether it stores IP addresses, how it tells visitors apart, where and how long data is kept, and your GDPR lawful basis, usually legitimate interests.
- [ ] Sign your analytics vendor's data processing agreement.
- [ ] Add a free, one-click way to object, such as an opt-out link in the privacy policy. The UK exception requires one and the CNIL grid expects one.
- [ ] Keep a banner for EU and UK visitors if you run GA4 or an ad pixel, set an analytics cookie outside France's exemption, or rely on visitor-level data such as visit timelines, user ids or revenue tied to a visitor.
- [ ] In the US, check whether the CCPA covers you; if a tag sells or shares data, add a "Do Not Sell or Share" link and honour GPC.
- [ ] Check again in 2027, when the Digital Omnibus and California's browser signal may change this list.

The trap to avoid is treating "cookieless" as the exemption. Every exemption above comes with conditions, usually notice, an opt-out and aggregate use only, and you meet them in your privacy policy and your setup, not in your vendor's marketing.

[^breyer]: The EU Court of Justice held in [Breyer (C-582/14)](https://curia.europa.eu/juris/liste.jsf?num=C-582/14) on October 19, 2016 that a dynamic IP address can be personal data for a website operator with legal means to identify the person behind it.
