Skip to content
All insights
PracticeData

Analytics without a cookie banner

Aaron WylieDecember 9, 20267 min read

We wanted to know what people read on our own site. We did not want a consent dialog, a third-party script, or a profile of anybody. Here is what that costs and what it gets you.

Analytics on a company website usually exists to answer four questions. What did people read, where did they arrive from, roughly where are they, and did anybody get in touch. None of those require following a person around the internet.

The measurement on this site answers those four and nothing else. It sets no cookies, loads no third-party script, and the privacy page says so in plain language. Here is how it works, and what we gave up to get there.

No cookie, no identifier

The usual way to count returning visitors is to store an identifier in the browser. That is also the thing that triggers consent requirements, because it is the thing that makes tracking someone over time possible.

Instead, each view is recorded against a hash of the address, the user agent, the date and a secret. That distinguishes people within a single day, which is all that unique visitors ever meant. It cannot connect anyone to yesterday, because the date is one of the inputs and yesterday's hash is unreachable. The address itself is never written down, and the secret means nobody who obtains the table can recompute the hashes to find out whose it was.

What we lose is returning visitors, cohorts, and anything longitudinal. We have not yet needed them.

Counting crawlers instead of guessing

The beacon only fires once a page's JavaScript runs, which a lot of people treat as proof of a human. It is not. The serious crawlers render pages fully, run the script and get counted.

For a while that quietly inflated everything. On some days most of our traffic was Googlebot, an AI crawler and a scanner nobody had heard of, all filed as people.

The fix is not to drop those views. Dropping them loses the evidence and leaves you unable to explain an odd-looking day afterwards. Classify at the point of recording instead: a list of named crawlers first, then a general catch-all for a bot/1.0 style token, a +http:// info link, or a known HTTP client library.

Two details worth stealing if you build this. Word-bound the generic match, or a phone model like the CUBOT gets filed as a robot. And treat an empty user agent as a crawler, because real browsers always send one.

The daily report then shows people and crawlers as separate numbers. The crawler figure turns out to be the more useful of the two on any given morning, because a sudden drop in it is often the first sign that something is broken.

Location without a third party in the browser

We wanted city-level location in the daily summary. Every hosted analytics product does this with a script in the visitor's browser, which is precisely the thing we were avoiding.

Resolving it on the server keeps the promise instead: the visitor's browser talks to us and to nobody else. Our server sends the address to a geolocation service, keeps the city, region and country, and discards the address. A slow or failed lookup produces nothing rather than losing the view.

That is still a third party receiving an IP address, so the privacy page names it and says what it is for. When a privacy policy and the code disagree, it is the policy that is wrong.

What a day actually looks like

The output is one email each morning. Views and visitors with a comparison against the day before, the top pages, where people arrived from, their locations, any enquiries, and the crawler figures underneath.

That is the entire product. No dashboard, no session recordings, no funnels. For a site this size the email beats a dashboard, because it arrives whether or not anyone remembers to go and look.

If the only way to find out how yesterday went is to log into something, you will find out on the days you were already paying attention.

Where this is the wrong answer

This does not suit everyone. If you run paid acquisition and need conversion attribution across sessions and devices, you need the thing we deliberately did not build. The same goes if a marketing team depends on cohort retention curves.

It suits a site where the real question is what people read and whether they got in touch. That covers most company websites, including a great many that currently carry a consent dialog nobody wanted in front of an analytics suite nobody opens.

The part that is not technical

The reason to build it this way is not the law. It is that a consent banner is the first thing your site says to a visitor, and what it says is that you are about to do something they might object to.

Not needing one is a better position than having a well-designed one.

Ready to build something that lasts?

Tell us what you are trying to ship. We will tell you how we would approach it - scope, stack, and timeline - before you commit to anything.