Say you run a small online bookshop. On Monday your analytics shows 410 visitors, and by Sunday the weekly report says 2,580. But your regulars drop in three or four times a week, so how many different people actually came?
If your analytics is cookieless, the answer depends on how cookieless tracking counts unique visitors in the first place. This post walks through it step by step, so by the end you’ll know which of your numbers are exact, which one is an estimate, and which to use for what.
Key takeaways
- Each request is reduced to a hash of the user agent, IP address and site domain, keyed with a random salt that changes every 24 hours.
- The IP address and user agent are inputs only. The hash is kept with the raw events, and the salt is deleted after 48 hours.
- Putting the domain in the hash means stored data can’t be joined across sites, though someone holding a current salt could still compute candidates.
- Visitors are per-day: a person who returns on another day, or changes network or browser, counts twice. Visits and pageviews are exact.
- Two live salts let a visit that crosses the rotation carry on as one visit.
Why does counting visitors need an identifier?
Counting pageviews is easy, because every page load is one. Counting visitors is harder: you need to know that the page load at 10:02 and the one at 10:07 came from the same person.
A cookie solves that by giving each browser a label on its first visit and reading it back later. The same label lets a tool say the person came back next week, too.
Take the label away and you need something else that stays the same between those two requests. Two things arrive with every request anyway: the browser’s user agent string and the IP address it came from.
Together, they’re a decent stand-in for “this browser on this network right now”. They’re also exactly the kind of data you don’t want to keep, so the method below uses them and then throws them away.
How the daily salted hash works, step by step
FunnelSights turns each request into a visitor ID with one formula:
visitor_id = blake2b(user_agent + ip + domain, key=daily_salt)
- ArriveA pageview or event reaches the ingest endpoint. The user agent and IP address come from the request, and the page, referrer and event name come from the payload.
- CombineThe user agent, IP address and the site’s domain are joined into one input.
- KeyThat input is hashed with BLAKE2b, keyed with today’s salt: 16 random bytes made by the server. The output is a 64-bit number.
- MatchIngest looks for an open visit under that hash, or under the hash from the previous salt. A visit stays open until 30 minutes pass with no activity.
- StoreThe event is stored with the hash. The IP address and raw user agent string are dropped, while the browser, operating system and device type are kept.
- CountEvery 15 minutes, the rollup counts distinct hashes per day. That count is the day’s visitors.
A shorter summary of the same mechanism is on how it works.
A hash is a one-way function. The same input always gives the same output, but you can’t work backwards from the output to the input.
Keying the hash with a secret salt adds a second protection. Without the salt, nobody can compute what hash a given IP and user agent would produce, even if they know the formula.
That matters because IP addresses aren’t very varied. There are only about four billion IPv4 addresses, so an unkeyed hash of one could be reversed by simply trying them all.
Back at the bookshop, a customer who browses three pages over ten minutes produces the same hash each time. Those three pageviews become one visit by one visitor.
What rotates, and when?
The salt is the part that changes. It runs on its own 24-hour clock rather than at midnight.
- A new salt is created when the current one is 24 hours old. It’s random, and it isn’t derived from the old one.
- Two salts are live at once: the current one and the one before it. Ingest checks both, so a visit that starts at 23:59 is still the same visit at 00:01.
- When a visit is matched through the previous salt, it’s re-keyed to the current hash, so it keeps one identity for the rest of the visit.
- Any salt older than 48 hours is deleted. The clean-up runs every time the salts are refreshed, rather than in a separate job that could quietly stop.
That 48-hour deletion is the real privacy guarantee. Until it happens, the server could in principle recompute yesterday’s hashes from an IP address and user agent. Once it has happened, nobody can, including us.
There’s one small side effect. Because the rotation isn’t tied to each site’s midnight, a customer who visits in the morning and again in the evening can occasionally fall either side of a rotation and count twice on the same day.
Why is the domain part of the hash?
The domain is the easiest input to overlook. Without it, someone visiting two different sites measured by the same tool would produce the same hash on both, and the vendor’s database could link their activity just by matching values.
With the domain included, the inputs differ, so the hashes differ, and nothing stored links the two sites.
Be precise about the limit, though. The inputs aren’t secret, so somebody holding a current salt could take one IP address and user agent, compute the hash for each domain, and match them.
Nothing in the hash itself prevents that. What bounds it is time: after 48 hours the salt is gone, and with it the ability to compute anything. Cookieless measurement states the same limit.
Why do returning visitors count twice?
Here’s the cost. Tomorrow’s salt has nothing to do with today’s, so tomorrow the same browser on the same network produces a different hash, and the data treats it as a new visitor.
This is deliberate. Forgetting visitors overnight is the property that makes the design private.
So visitor counts are per-day. A weekly or monthly figure adds up each day’s distinct visitors instead of removing repeats, which is why the bookshop’s regulars appear several times in that 2,580.
Illustrative numbers for a hypothetical shop. The weekly visitors figure is the sum of these daily counts (2,580), so a regular who visits on four days is in it four times.
The same thing happens within a day whenever one of the inputs changes. Here’s what happens to one person in five different situations.
| Visits | Visitors | |
|---|---|---|
| Two pages, ten minutes apart, same browser and network | One | One |
| Back the next day, same browser and network | Two | Two, because the salt changed |
| Office Wi-Fi in the morning, mobile data at lunch | Two | Two, because the IP changed |
| Phone in the morning, laptop in the evening | Two | Two, because the user agent changed |
| Two colleagues on the same browser version behind one office IP | Can merge into one | Can merge into one |
Merging is the rarer error and runs the other way: identical inputs give identical hashes.
Which visitor numbers should you trust?
The numbers you can rely on are the ones that never needed to recognise a person across days. Visits, pageviews and events are exact counts, and so is conversion rate per visit.
Only “visitors” is an estimate, and it drifts upwards over longer date ranges. Use each number for the job it’s good at:
- For trends over weeks or months, use visits or pageviews. They’re exact and they move with your traffic.
- For reach on a single day, daily visitors is a good estimate.
- For conversion rates, divide conversions by visits, not by a multi-day visitor total that counts regulars more than once.
- For loyalty and how often people return, a cookieless tool has no answer, because it forgets visitors after a day.
So the bookshop owner should track her week in visits and orders, and read 2,580 as “daily visitors added up” rather than 2,580 different people. Bots are filtered out before any of this happens, so they don’t inflate the count. Bot traffic and referrer spam explains how.
If repeat-visit frequency is central to your business, a cookieless tool is the wrong instrument for it, and it’s better to know before you switch. The metric definitions guide explains each number, and the cookieless analytics guide covers what else you keep and lose.
Is a daily hash the same as fingerprinting?
No, and the difference matters. Fingerprinting collects many details about a browser, such as screen size, fonts and graphics quirks, and combines them into an ID designed to stay the same for weeks or months.
In other words, fingerprinting is tracking that has moved somewhere harder to see. A daily salted hash uses two values every request carries anyway, plus the domain, and it’s built to forget: it reads no extra details from the browser, and its key is deleted after two days.
It isn’t anonymous in the strict sense, though. While the salt exists, the hash is a pseudonym that singles out one browser on one network for one day.
Is analytics data personal data? covers what that means legally, and analytics without storing IP addresses covers what happens to the IP address itself.
Frequently asked questions
How does cookieless tracking count unique visitors?
It hashes values that arrive with every request (in FunnelSights, the user agent, IP address and site domain) under a secret salt that changes every 24 hours. Requests that produce the same hash on the same day count as one visitor. The IP and user agent aren’t stored, and the salt is deleted after 48 hours.
Why are my weekly visitors higher than the real number of people?
Because a weekly figure adds up each day’s distinct visitors. Someone who visits on three different days counts three times, and so does anyone who switches network or browser. Use visits and pageviews, which are exact, when you need a number you can defend.
What is a salt in analytics?
A salt is a random secret mixed into a hash so the output can’t be predicted from the input alone. Rotating the salt daily means the same visitor produces a different hash each day, and deleting old salts means past hashes can no longer be recomputed by anyone.
Can a hashed IP address be reversed?
An unsalted hash of an IP address can be reversed easily, by hashing every possible address until one matches. A hash keyed with a secret salt can’t be reproduced without the salt, and once the salt is deleted the hash can’t be recomputed at all.
Does a cookieless visitor count include bots?
Not in FunnelSights. Bots are identified at ingest from their user agent against a maintained crawler database and counted in a separate bot report, so they never reach the visitor count. Referrer spam is dropped the same way.
More in this series
This post is part of Cookieless analytics: how it works, what it costs, and how to choose, our guide to privacy-first analytics.
- Do you need a cookie banner for analytics?You’ve switched to cookieless analytics and someone asks if the banner can finally go. The answer turns on two different rules and on where your visitors are. Here’s how to think it through.
- Is analytics data personal data under the GDPR?A client’s questionnaire asks whether your analytics processes personal data, and you’re not sure what to write. Here’s how IP addresses, IDs, hashes and aggregates are generally treated.
- Analytics data retention: how long to keep whatA client asks how long you keep their visitors’ analytics data, and you realise nobody ever decided. Here’s why retention matters, how to choose a period for each kind of data, and what FunnelSights keeps.
- IP anonymisation in analytics: why not storing beats maskingMost IP anonymisation masks part of the address and keeps the rest. Here’s what analytics uses an IP for, why masking is weaker than it sounds, and what not storing one looks like.
