Privacy
Cookieless analytics: how visitors are counted and what to configure
How PureStats counts visitors without cookies, what it does with IP addresses, and which privacy settings to choose: consent, location precision and retention.
Key takeaways
- Without cookies, a visitor is a daily hash, so the same browser counts again the next day.
- The IP address is shortened for the hash and used for location, but not stored with pageviews.
- Consent mode, location precision and retention are settings per site.
How PureStats counts visitors without cookies
In its default mode PureStats stores nothing in the browser. For each hit, the server builds a SHA-256 hash from the shortened IP address, the browser's User-Agent with version numbers removed, the date in the site's timezone and a salt that changes daily. Hits with the same hash on the same day belong to the same visitor.
A visit (session) ends after 30 minutes without activity. Because the date is part of the hash, the same browser gets a new hash the next day. A person who comes back on three different days therefore counts as three visitors in a weekly total. That is the price of not following people across days, and it is why cookieless visitor numbers over long periods read higher than cookie-based ones.
- Visitors: distinct daily hashes in the period.
- Visits: sessions, each ending after 30 minutes without activity.
- Pageviews: every page loaded, including repeats.
What happens to the IP address
While a hit is processed, the IP address is used twice: once for the location lookup and once, shortened, inside the visitor hash. PureStats does not store the IP address with pageviews or sessions in its analytics database.
In standard mode the last block of an IPv4 address is removed before hashing; IPv6 addresses keep their first 48 bits. Strict mode removes the last two IPv4 blocks and keeps 32 bits of IPv6, so more visitors share a hash and counts get coarser. Location precision is a separate setting: city, region, country or none. The User-Agent is stored, because browser, operating system, device and bot detection come from it.
Consent and Do Not Track
Each site has a consent mode. No consent required is the default and tracks every pageview. Manual opt-in waits until your consent banner calls purestats.consent.grant(), and sends nothing before that. Tracking disabled stops tracking for the site.
Respect Do Not Track is off by default. Turn it on if you want browsers that send the Do Not Track signal to be left out. This article explains what the product does; whether your site needs consent depends on your setup and your jurisdiction, so check with your legal advisor.
Keep only what you need
Raw events are kept for 395 days by default, long enough to compare a month with the same month last year. Daily aggregates are kept for up to five years (1,825 days), so long-term charts survive after the raw rows are deleted. Both periods are settings per site, with a minimum of 30 days.
Shorter retention is a real privacy decision, not a formality: data that has been deleted cannot leak, be requested or be misused. Pick the shortest period your comparisons need.
A setup checklist
All of these are in the site's privacy settings.
- Choose standard or strict IP anonymization.
- Set location precision to the level your reports use.
- Pick a consent mode that matches your banner, if you have one.
- Decide whether to respect Do Not Track.
- Set retention for raw events and aggregates.
- Add path exclusions for private areas such as account pages.
- Optionally publish the privacy center, a public summary of these settings for your visitors.
Frequently asked questions
Does PureStats use cookies?
Not in its default mode. Cross-domain stitching sets a first-party cookie, and experiments, the consent API and tracking test mode use browser storage, each only when you use them.
Why do my visitor numbers differ from a cookie-based tool?
PureStats counts a returning browser again on each new day, and it includes visitors who would decline a cookie banner. Over a week or a month, both effects make the numbers differ.
Can I count returning visitors across days?
Only with an identifier you opt into: cross-domain stitching, or identify() for signed-in users. Both are off by default.
Review the privacy settings in the demo
The demo shows the real settings and reports with example data. Your own sites start in the default mode described here.
Start free

