Privacy
Cookieless analytics explained: how visitors are counted without cookies
How cookieless analytics counts unique visitors with a daily rotating hash instead of a cookie, what it can and cannot tell you, and the trade-offs.
The CrispStats team · · Updated · 7 min read
In short
Cookieless analytics counts visitors without storing anything in the browser. Instead of reading an id from a cookie, the server derives a short-lived anonymous id from the request itself, usually a hash of a daily secret, the site, the IP address and the user agent. That is enough to count unique visitors and sessions for a day. It is not enough to follow one person across days, devices or sites, and that is the point.
On this page · 7 sections
Sections
- What does cookieless analytics actually mean?
- How are unique visitors counted without a cookie?
- How do sessions work without cookies?
- What can cookieless analytics not tell you?
- Cookies, fingerprinting and the daily hash compared
- Is cookieless data accurate enough to make decisions?
- How CrispStats counts visitors
Most analytics tools built in the last twenty years start the same way: the first time you visit a site, a script writes a random id into a cookie. Every later request carries that id, so the tool knows that Monday’s reader and Thursday’s buyer are the same browser. It works well, and it is exactly the kind of storage that privacy rules ask you to get consent for.
Cookieless tracking takes a different route. Nothing is written to the device. The visitor is recognised from information that arrives with every web request anyway, and only for a short time.
What does cookieless analytics actually mean?
It means the tool does not store an identifier on the visitor’s device: no cookie, no localStorage entry, no IndexedDB record. The script sends a small message when a page is viewed (the URL, the referrer, the screen width, the language) and the server works out the rest.
The term is sometimes stretched. A tool that drops the cookie but writes the same id to localStorage is not cookieless in any way that matters, because the privacy rules are about storing or reading information on the device, whatever the mechanism. When you evaluate a tool, ask what it writes to the browser, not only whether it uses cookies.
How are unique visitors counted without a cookie?
With a hash that changes every day. When a request reaches the collector, it combines four things and runs them through a one-way hash function such as SHA-256:
- A daily salt. A random secret generated for that calendar day and deleted shortly after the day ends.
- The site id. So the same person on two different sites gets two unrelated ids.
- The IP address of the request.
- The user agent string the browser sent.
visitor id = SHA-256( daily salt | site id | IP address | user agent )The output is a string of hex characters that stands in for the visitor: the visitor hash. Two page views from the same browser on the same day produce the same hash, so they count as one unique visitor. The IP address and the user agent are used for this calculation and then thrown away. Only the hash is stored.
Why the salt matters
Without the salt, the hash would be a stable fingerprint: anyone with a list of IP addresses could recompute it. With a salt that is random, secret and deleted every day, yesterday’s ids cannot be recomputed and cannot be linked to today’s. The same person tomorrow is a new, unrelated id.
Worked example: Tuesday’s reader, Wednesday’s new visitor
Say a reader opens your pricing page at 09:10 on Tuesday, reads a blog post at 09:14, and comes back at 16:30 to sign up. All three requests share an IP address and a user agent, so all three hash to the same id, for example a41f…. Your dashboard shows one visitor, two sessions and three page views.
On Wednesday the same reader returns. The salt has rotated, the hash is now 7c02…, and the dashboard counts a new visitor. Nothing connects a41f… to 7c02…, not even for the people who run the analytics service.
How do sessions work without cookies?
A session is a run of activity from one visitor id. The usual rule is a timeout: if the same id is quiet for 30 minutes, the next page view starts a new session. Some tools, including this one, also start a new session when the visitor arrives through a different campaign or referrer, so that each visit is credited to the source that caused it.
Because the id lasts all day, sessions inside a day are counted properly: entry page, exit page, duration, bounce rate and funnels all work as they do in a cookie-based tool.
What can cookieless analytics not tell you?
The design gives some things up on purpose. It helps to know them before you rely on the numbers.
- Returning visitors across days. A reader who visits on Monday and Friday is counted as two daily visitors. Weekly and monthly unique counts are therefore sums of daily uniques, and run higher than a cookie-based tool would report.
- Cross-device journeys. A phone and a laptop are two ids. That is also true of cookies, unless people log in.
- People behind one address. Two people in the same office with the same browser version can hash to the same id for the day. In practice this undercounts slightly on large shared networks.
- A changing address. A phone that moves from wifi to mobile data gets a new IP address and so a new id, which overcounts slightly.
These effects are small for daily numbers and pull in opposite directions. They matter most for questions like “how many people came back within 30 days”, which a daily id cannot answer without help.
Cookies, fingerprinting and the daily hash compared
| Row | Cookie id | Fingerprinting | Daily rotating hash |
|---|---|---|---|
| Stores something on the device | Yes | No | No |
| Recognises a visitor for | Months or years | Until the device changes | One day |
| Works across sites | Only third-party cookies | Often, by design | No, the site id is in the hash |
| Returning visitors across days | Yes | Yes | No |
| Typical consent position | Needs consent in the EU | Generally treated like a cookie | Often argued not to need it |
Fingerprinting deserves a separate mention, because it is sometimes sold as cookieless. It combines many device traits (fonts, canvas rendering, screen size, plugins) into an id that is stable for as long as the device is. It stores nothing, but it identifies a person more persistently than a cookie and cannot be cleared. A daily hash uses two inputs the server receives anyway, mixes in a secret that expires, and stops recognising you at midnight.
Whether any of these needs a consent banner depends on where you and your visitors are. The short version is in do you need a cookie banner for analytics, and what each European regulator has published is in analytics and consent in Europe. Neither is legal advice.
Is cookieless data accurate enough to make decisions?
For the questions most sites ask, yes. Which pages are read, where visitors come from, which campaign converts, where a funnel leaks: none of these needs a long-lived identity. They need consistent counting, and a daily id is consistent.
There is also an accuracy gain that is easy to miss. A cookie-based tool behind a consent banner only sees the visitors who click accept. Say 10,000 people visit and 6,000 accept: every number in the dashboard describes 60% of the audience, and not a random 60%. A tool that needs no stored id can count all 10,000.
How CrispStats counts visitors
CrispStats counts exactly as in the Tuesday and Wednesday example: one hash per browser, per site, per day, with the salt rotated daily. Nothing is written to the device by default, and of the four inputs only the result is kept; the IP address and raw user agent are used at the edge for the hash and the device type, then dropped. Sessions end after 30 minutes of inactivity or when a visitor arrives through a different campaign or referrer, which is why the example’s reader has two sessions, not one.
The install is one tag:
<script defer src="https://in.crispstats.com/d.js" data-site="YOUR_SITE_KEY"></script>There is an opt-in mode for sites that want returning visitors recognised across days. It stores a random id in localStorage, which is storage on the device, so it should only be switched on with consent. It is off unless you ask for it. The details are in the cookie policy and the persistent visitors docs.