Analytics
Cookieless analytics, explained: how to measure a website without tracking people
What cookieless analytics actually is, how visitors are counted without cookies, what you lose compared with Google Analytics, and why most small sites are better off.
The StaticHero Team · · 2 min read
If you run a small website, you probably want to know three things: how many people visit, where they come from, and which pages they read. You probably don’t want a cookie consent pop-up covering half your homepage.
Cookieless analytics gives you the first without the second. Here’s how it works and what the trade-offs are.
Why traditional analytics needs cookies
Classic tools recognise a returning visitor by storing an identifier in a cookie. That identifier follows the person across visits — and, for some tools, across sites. In the EU and UK, and increasingly elsewhere, storing that kind of identifier generally requires consent.
The result: a consent banner, a sizeable share of visitors clicking “reject”, and data that undercounts reality anyway.
How cookieless counting works
Privacy-first tools count visits without storing anything in the browser. A common approach — the one StaticHero uses — works like this:
- When a pageview arrives, the server combines a secret salt that changes every day, the site ID, the visitor’s IP address and their browser’s user-agent.
- It hashes that combination into an anonymous number.
- Pageviews with the same number on the same day count as one visitor.
- At midnight the salt is thrown away and replaced.
Because the salt is discarded daily and the raw IP is never stored, the hash can’t be reversed or linked across days or across websites.
What you still get
- Unique visitors and pageviews
- Bounce rate and visit duration
- Top pages, entry pages and exit pages
- Referrers and channels (Google, social, newsletters, AI assistants)
- UTM campaign tracking
- Countries, devices, browsers and operating systems
- Custom events and conversion goals
For most small sites, that’s everything that informs real decisions.
What you give up
Being honest about the trade-offs:
- Returning visitors across days are counted again. “Unique visitors this month” is the sum of daily uniques, which slightly overcounts loyal readers.
- Cross-device journeys can’t be stitched together.
- Individual user profiles don’t exist — by design.
- Ad-platform integrations (remarketing audiences and similar) aren’t possible.
If you run paid advertising at scale, you may still want a traditional tool alongside. For a portfolio, a local business or a product landing page, these losses rarely matter.
Not legal advice
Cookieless analytics removes the main reason most sites need a consent banner, but every business is different. If you’re in a regulated industry, check with your own adviser.
Performance matters too
Analytics scripts are often among the heaviest things on a page. StaticHero’s tracker is under 2 KB, loads with defer, sends data with navigator.sendBeacon, and is served from your own domain — so it doesn’t slow the page down or get treated as a third-party tracker.
Seeing traffic from AI assistants
A growing share of visits now arrive from ChatGPT, Claude, Perplexity and Gemini answers. Good analytics should name these sources rather than dumping them into “referral”. StaticHero recognises them as their own channels so you can see whether AI search is sending people your way.
Put your site online in seconds — free.
Getting started
On StaticHero, analytics is switched on automatically for paid plans — there’s no snippet to paste. Open a site’s Analytics tab and data starts appearing with the next visit. To track a button click, add one attribute:
<button data-sh-event="Signup">Join the waitlist</button>Measure what matters, and leave your visitors alone.
Keep reading
Your site could be live in the next minute.
One site free, forever. No credit card, no setup, no servers.