Why do sites show a cookie banner for analytics?
Because most analytics tools store an identifier on the device, usually a first-party cookie, so they can recognise a returning browser. In the EU and the UK, storing or reading information on a device generally needs consent unless it is strictly necessary for the service the visitor asked for, and analytics is usually not treated as strictly necessary. The banner is how sites ask. The rules are summarised under the ePrivacy Directive and GDPR. The UK is moving: the Data (Use and Access) Act 2025 added an exception to PECR for storage used only to collect statistics about how a site is used, on conditions that include clear information and a simple, free way to object; read the ICO’s guidance on the exceptions before relying on it.
The cost is data. Visitors who decline, or close the banner, disappear from your reports, and the ones who remain are not a random sample. Consent mode tries to model the gap; it does not measure it.
What makes analytics work without a banner?
Three things, all of which have to hold:
- Nothing is stored on the device. No cookie, no localStorage or sessionStorage id, no cached identifier.
- No lasting identifier is built. No browser fingerprinting that recognises the same device next week.
- No personal data is kept. IP addresses and raw user agents are not stored, and events carry no names or emails.
CrispStats meets all three in its default setup. Unique visitors are counted with a visitor hash built from a secret salt that changes every day, so the hash stops recognising anyone at midnight in the site’s timezone. The full mechanics are in cookieless analytics, and what that still lets you see about each visit is in website visitor tracking. European regulators read the device rule broadly, beyond cookies, which is one reason their views on cookieless tools differ.
What on your site still needs consent?
Removing analytics from the banner is half the job. The banner can only go when nothing else on the page needs it. Audit the scripts and embeds your site loads:
| Item on the page | Usually needs consent? | What to do |
|---|---|---|
| Cookieless analytics in its default setup | No identifier stored | Keep it |
| Ad pixels and conversion tags | Usually yes | Keep them behind consent, or remove them |
| Video embeds from large platforms | Often yes | Use a privacy-enhanced mode or a click-to-load preview |
| Chat and support widgets | Often yes | Load on click instead of on every page |
| A/B testing and session replay tools | Usually yes | Keep them behind consent |
| Social share buttons with tracking | Often yes | Replace with plain links |
| CrispStats persistent visitors mode | Yes, it stores an id | Leave it off, or switch it on only after consent |
| Your own login session cookie | Usually no, it is strictly necessary | Keep it, and list it in your cookie policy |
How do you remove the banner safely?
- List every script and embed. Open your site with the browser’s developer tools and note every cookie and storage entry after a fresh visit, before any click.
- Replace or gate what needs consent. Use the table above. Anything you keep that stores data still needs a prompt.
- Add cookieless analytics next to the old tool. Run both for a week and compare trends, then remove the old one.
- Check again on a clean browser. No cookies or storage entries should appear except strictly necessary ones.
- Update your privacy and cookie pages. Say what analytics collects and that it sets no cookies. Our own cookie policy is an example.
<script defer src="https://in.crispstats.com/d.js" data-site="YOUR_SITE_KEY"></script>The tag above is the whole install, and nothing about it needs a line in your banner. Because the banner no longer filters who is counted, expect visitor numbers to rise when you switch; your plan’s events a month, 250,000 on Starter, is the allowance to check that against.
Read do you need a cookie banner for analytics for the reasoning by region, and cookieless analytics explained for what gets counted.