Default: nothing stored on the device
By default, the tracker sets no cookies and writes nothing tolocalStorage or sessionStorage. To recognize a visitor, OpenRevenue makes a daily ID on its servers from:
- a random salt that is kept secret, changed every day and then deleted,
- your project ID,
- the visitor’s IP address, shortened to its network (the last part is removed),
- the browser’s user agent.
This is not legal advice. If your site has specific legal requirements, check with your own advisor.
What the daily ID means for your reports
Old IDs set by earlier versions of the tracker (
_ova_vid, _ova_uid, _ova_sid) are deleted automatically in the default mode.
Keep a visitor ID with consent
If you show a cookie banner anyway, you can keep returning visitors for people who accept. Adddata-persist="consent" to the script:
index.html
consent:
banner.js
consent(true), the tracker keeps today’s ID in a first-party cookie and in localStorage (_ova_vid), so the visit continues without a break. consent(false) deletes the stored ID and goes back to storage-free tracking. Call consent(true) on every page load where your banner has a stored “accepted” answer.
With the npm package, pass persist: "consent" to init and import consent:
app.ts
Always keep a visitor ID
data-persist="true" (or persist: true) stores the visitor ID on every visit, as earlier versions of the tracker did. The ID lasts up to two years. In the EU and UK this usually needs consent, so load the script only after the visitor agrees, or use data-persist="consent" instead.
What the tracker can store
Opt-out signals
The tracker sends nothing when the browser has Do Not Track or Global Privacy Control turned on. The collector also ignores requests with theSec-GPC: 1 header.