Cookieless analytics
Cookieless analytics measures visits without storing an identifier on the visitor’s device, usually by hashing request data with a salt that changes every day. No cookie means no consent banner in most setups, no visitors lost to declined consent, and less personal data held, at the cost of not recognising anonymous visitors across days.
Formula
visitor_id = sha256(site_id | ip | user_agent | daily_salt)[0:16]Combine the site id, IP address, user agent and a salt that rotates every day, hash them with SHA-256, keep the first 16 bytes, and throw away the IP and the old salt.
Worked example
| Visit 1, Monday 10:00 | same IP and browser |
|---|---|
| Visit 2, Monday 15:00 | same IP and browser |
| Visit 3, Tuesday 09:00 | same IP and browser |
- Monday visits hash with Monday’s salt to the same id.
- Tuesday’s salt is different, so the hash differs.
Two visitors are counted: one for Monday, one for Tuesday, until the person signs up and identify links them.
How ProductLense shows it
ProductLense’s script sets no cookies and uses no local storage. The ingest service computes the visitor id from a daily salt and never stores the IP. After identify, the user id joins visits across days, which is the point where revenue attribution needs it.
Nothing beyond the script tag. For cross-day journeys of signed-up users, call identify with your user id; ProductLense keeps it in session storage for the tab so later events in that tab carry it.
Cookieless analytics: questions
- What is cookieless analytics?
- Cookieless analytics measures visits without storing an identifier on the visitor’s device, usually by hashing request data with a salt that changes every day. No cookie means no consent banner in most setups, no visitors lost to declined consent, and less personal data held, at the cost of not recognising anonymous visitors across days.
- How do you calculate cookieless analytics?
- Combine the site id, IP address, user agent and a salt that rotates every day, hash them with SHA-256, keep the first 16 bytes, and throw away the IP and the old salt. For example, the same browser visiting on Monday and Tuesday counts as two visitors until it identifies.
- Where does ProductLense show cookieless analytics?
- ProductLense’s script sets no cookies and uses no local storage. The ingest service computes the visitor id from a daily salt and never stores the IP. After identify, the user id joins visits across days, which is the point where revenue attribution needs it.
- What does ProductLense need to calculate cookieless analytics?
- Nothing beyond the script tag. For cross-day journeys of signed-up users, call identify with your user id; ProductLense keeps it in session storage for the tab so later events in that tab carry it.
- How is cookieless analytics different from first-touch attribution?
- Cookieless counting limits how far back first touch can reach for anonymous visitors: a visit on a previous day is a different visitor unless identify links it. In practice most SaaS customers sign up within a session or two, and identify carries everything after that.
Free up to 10k events a month. No card.
Add the script, connect Stripe or any of 14 other billing providers, and see revenue by channel the same day.