Cookieless analytics: how to measure your website without cookies

How cookie-free web analytics counts visitors without storing anything on their device, what you give up, what you gain, and when consent still matters.

Keen Analytics team2 min read

Cookie banners have become the toll booth of the web. Visitors click them away, a large share decline, and the analytics you get afterwards only describes the people who said yes. Cookieless analytics takes a different route: it measures the website without storing anything on the visitor's device.

How do you count visitors without cookies?

Traditional analytics puts an ID in a cookie and reads it on every page. A cookieless tool instead recognises a visit for a short time from information the browser already sends, combined with a secret that changes every day. In Keen Analytics:

  • Each visitor is counted with a hash that changes daily. The secret behind it is destroyed after 48 hours, so old hashes can never be rebuilt.
  • IP addresses are used in memory to find the country, then discarded. They are never stored or logged.
  • Nothing is written to cookies or local storage in the default mode.
  • Groups too small to be anonymous are hidden from reports, so no row singles anyone out.

What you give up

Being honest about the trade-offs is part of choosing well:

  • Returning visitors across days can't be recognised, because the daily hash changes. Unique visitors are counted per day.
  • Long, multi-week journeys can't be stitched together person by person.
  • Cross-device tracking isn't possible, by design.

For most websites these matter less than they sound. The decisions you make (which channel to invest in, which page to rewrite, which campaign worked) depend on aggregate numbers, and aggregate numbers are exactly what cookieless analytics measures well. If you do need multi-day attribution, Keen can optionally keep a random first-party ID, which may require consent depending on where you operate.

What you gain

  • Complete numbers. You count everyone, not only the visitors who accepted cookies.
  • A faster site. A cookieless script can be tiny: Keen's is about 1.2 KB, against roughly 135 KB for Google Analytics 4 (as measured by Plausible).
  • Less to manage. No consent mode configuration, no cookie policy table for analytics.
  • Trust. Telling visitors you don't track them is a feature in itself.

Cookie laws such as the ePrivacy rules in the EU are about storing or reading information on the visitor's device. Analytics that does neither is in a very different position from cookie-based tracking, and many sites using cookieless tools don't show a banner for analytics. Rules differ by country and depend on your whole site, though, so check with your own legal adviser. This article is not legal advice.

Switching is quick

You can run a cookieless tool alongside your current analytics for a few weeks and compare. With Keen, that's one script tag; see the install guide or the comparison with Google Analytics.

Keep reading