The standard snippet sets no cookies, but it keeps a random visitor ID and the current visit in the browser's local storage, so it knows the same person when they come back. Under the EU's ePrivacy rules (the "cookie law") and the UK's PECR, storing something in the browser counts the same as a cookie, so many sites ask for consent before the snippet runs. Cookieless mode stores nothing in the browser at all, so Behavly needs no cookie banner. It costs accuracy over time, set out below.
How It Works
- Nothing on the visitor's device. No cookies, no local storage, no session storage. What the snippet needs while a page is open stays in memory and is gone when the page closes. Moves between pages inside a single-page app stay one visit.
- A visitor ID worked out on Behavly's server. Each request's IP address, the browser's user agent and your site's key are combined with a random value that changes at midnight UTC, and scrambled with a keyed SHA-256 hash. The same browser on the same network is one visitor for the day, on your site only.
- The random value is deleted. Each day's value is kept only on Behavly's server and deleted about 48 hours after it was made. From then on nobody, Behavly included, can work that day's IDs out again from an IP address and a browser.
- The IP address is not stored. It is used to work out the ID and nothing else. Country still comes from the request, as in the standard mode.
- Visits are joined on the server. The snippet can only remember a visit while a page is open, so Behavly joins a visitor's page loads into one visit when they are less than 30 minutes apart and the visit started under 4 hours ago, the same rule the standard snippet uses. A site with many pages still counts visits, not page loads.
- Your own heatmap viewing is the one exception. Opening a heatmap of your page from Behavly keeps that viewing session in the tab's session storage, as in the standard mode. That tab is yours, not a visitor's, and nothing in it is recorded.
Turn It On
- 1Go to Tracking → Setup and press the code icon next to your site.
- 2Switch on Cookieless mode, under the snippet.
- 3Copy the snippet again and put it on your site in place of the old one. It now carries
data-cookieless="true".
<script async src="https://behavly.io/t.js" data-pid="YOUR_WRITE_KEY" data-cookieless="true"></script>The switch takes effect on Behavly's side at once: from then on visitors are counted the cookieless way, even from the old tag. Only the new tag stops the browser storing anything, so replace it before you take Behavly out of your cookie banner. If the tag loads from your own subdomain, add data-cookieless="true" to that tag as well.
To go back, switch it off and put the standard snippet back.
What You Give Up
Without something kept in the browser, a visitor can't be recognised once the day's random value has changed. Every analytics tool without cookies has this limit, not just Behavly.
| Standard | Cookieless | |
|---|---|---|
Same visitor | Across days, until the browser's storage is cleared | Within one UTC day |
Returning visitors | Recognised | Everyone is new each day |
Visitors over a week or a month | One per person | One per person per day they visited |
Your other sites (subdomains, data-allowed-hostnames) | One visitor across them | A separate visitor on each |
Recognising who is signed in | Also reads the sign-in session your site keeps in the browser | Not from the browser's storage or cookies; see below |
`behavly.optOut()` | Remembered in the browser | Stops sending for the rest of the page |
Sends that fail | Sent again on the next page | Sent again only while the page is open |
Attribution suffers most. Someone who first arrived from an ad three weeks ago and signs up today is two different visitors, so the ad gets no credit for the sign-up. Daily numbers stay meaningful; journeys that span days don't.
People who share an IP address and the same browser version (an office network, some mobile networks) count as one visitor for that day. If one of them is recognised, the others' visits that day are recorded under that person, and a second person recognised the same day stays anonymous. Where the people who sign in to your product are the point, keep the standard snippet there and ask for consent where your law requires it.
Recognising Signed-In People
Cookieless mode still recognises people, from what the page itself shows: a call to behavly.identify(), a click on a link in one of your campaign emails, your own server's sign-in responses, sign-in tools that sit on the page (such as Clerk), lead and newsletter forms, and the account screen. It never reads your site's cookies, local storage or session storage, because reading the browser's storage needs consent just as writing to it does. A site whose sign-in lives only there should call behavly.identify() once the person is known.
The person is attached to that day's visitor, and nothing about them is kept in the browser. The next day they are anonymous until they are recognised again, which for someone signed in happens on their next page.
What You Still Have To Do
Cookieless mode takes away the need for consent to store things in the browser. It does not make the data anonymous: an ID worked out from an IP address is still personal data under the GDPR, and the people you recognise are named. Keep Behavly in your privacy notice, have a lawful basis for the analytics, and answer access and deletion requests. behavly.optOut() and behavly.consent(false) still work, for the page they are called on, since the snippet can't remember them; a site that offers an opt-out calls one on each page while the visitor's choice stands. Browser privacy signals work as in the standard mode when you choose to honour them.
Laws differ by country, and whether you need consent also depends on what else your site does. This page describes what the snippet does; it is not legal advice.



