Skip to main content
CrispStats counts visitors without cookies by computing an anonymous id on the collector for every event: a hash of a random salt that changes every day, your site, the visitor’s IP address and their User-Agent. The script sets no cookie and writes nothing to the visitor’s device, and the IP address and User-Agent are discarded once the id is computed. The trade-off is that a visitor is recognised for one day only. This page explains how the id is built, when the salt changes, why ids from different days cannot be linked, and what that means for returning-visitor numbers. If you need to recognise visitors across days, see persistent visitors.

What the browser stores

With the default script tag, nothing. The script:
  • sets no cookie,
  • writes nothing to localStorage, sessionStorage or IndexedDB,
  • reads one localStorage key, crispstats_ignore, which only you set in your own browser to exclude your visits.
The only exception is persistent visitors, which you turn on explicitly with data-persist and a site setting.

How the visitor id is computed

For each event from a browser, the collector computes:
The result is a 32-character hex string. It is stored with each event in place of anything that identifies the device. The IP address and User-Agent are used for this hash, for bot filtering and to read the browser, operating system and device type. They are then discarded: neither is stored or logged.

Salt rotation and expiry

Each day in your site’s timezone has its own salt. The day is the one your reports use, set in Settings, General, so it starts at local midnight (or, on the rare day a clock change skips midnight, at the first minute that exists):
  • A scheduled job runs every 15 minutes and makes sure the salt for every timezone’s day that starts in the next 26 hours exists, so a new salt is ready hours before your site’s midnight.
  • A salt expires 35 minutes after its day ends, when the key-value store deletes it. A collector instance that still holds a copy in memory drops it the next time it looks up a salt, and stops using it at that moment either way.
  • Once the salt is gone, nobody, including CrispStats, can recompute that day’s ids from an IP address and User-Agent.
If the salt store cannot be reached, each collector instance makes a random salt of its own, keeps it only in memory and tries the store again a minute later. Nothing is ever derived from a secret or the date, so no salt can be computed again. The cost is that the same person can count as more than one visitor while the store is unreachable.

The 30-minute grace after midnight

A visit that is in progress when your site’s day changes should not be cut in two. For the first 30 minutes of the new day, the collector computes both today’s id and yesterday’s id for each event. If the visitor has an open session under yesterday’s id, meaning an event in the last 30 minutes, the event joins that session and keeps the old id. Otherwise the event uses today’s id. From 30 minutes into the day only today’s id is computed, so any later event starts a new session under today’s id. This is why yesterday’s salt lives 35 minutes past midnight: 30 minutes for the session timeout plus 5 minutes of margin.

Why ids from different days cannot be linked

Today’s id and yesterday’s id for the same browser are hashes with different random salts. Nothing in either id reveals the other, and once yesterday’s salt expires there is no way to compute yesterday’s id again. The stored events do not contain the IP address or User-Agent, so the link cannot be rebuilt from the data either. The only exception is the grace window above: a session that crosses midnight keeps yesterday’s id for at most 30 minutes.

What this means for your numbers

Over a period longer than a day, the same browser counts once for each day it visited, in your site’s timezone. See counting visitors. Changing your site’s timezone starts a new day for its visitors within a minute: everyone on the site gets a new id, so a visitor already counted that day counts once more, and an open visit continues as a new session. Returning-visitor metrics are limited to what one day can show:
  • Retention cohorts count a return on a later day only for visitors you identify with crispstats.identify(), and for persistent visitors if you turn them on.
  • Revenue attribution links a payment to the visit when you pass the visitor id at checkout. Because the id changes daily, read it with crispstats.id() at checkout time rather than storing it for later. See visitor id at checkout.
  • Server-side events join a visit only when you pass a visitor id from crispstats.id(). They carry no IP address or User-Agent of their own.

Learn more on crispstats.com

Next steps

Persistent visitors

Recognise the same visitor across days, and what that requires.

Data collected

The exact fields each event carries and how long they are kept.

Compliance facts

A factual summary for a privacy or legal review.
Last modified on November 25, 2026