The words "first-party" and "third-party" describe whose domain the cookie belongs to, compared with the page you are on. If you are on example.com and the cookie is set for example.com, it is first-party. If the page loads something from ads.othercompany.net that sets a cookie for that domain, it is a third-party cookie.
How a first-party cookie is set
There are two ways:
| How | Example | Notes |
|---|---|---|
By the server, in a Set-Cookie header |
A sign-in session | Can be marked HttpOnly, so scripts cannot read it |
By a script on the page, through document.cookie |
An analytics visitor id | Readable by scripts on the same site |
The difference matters in Safari. WebKit's tracking prevention (opens in a new tab) deletes cookies created in JavaScript after 7 days without user interaction, so a first-party analytics cookie set by a script can vanish sooner than its stated lifetime. See Intelligent Tracking Prevention.
What first-party cookies are used for
- Keeping people signed in.
- Remembering a basket, a language or a theme.
- Recognising a returning visitor in analytics.
- Remembering a consent choice.
Can a first-party cookie track you across sites?
Not by itself. A cookie on example.com is sent only to example.com. Cross-site tracking needs a third party present on many sites, or identifiers passed in links. That is why browsers have restricted third-party cookies much more than first-party ones.
Do first-party cookies need consent?
The EU rule in the ePrivacy Directive does not care whose domain the cookie is on. It asks whether the cookie is strictly necessary for a service the visitor requested. A sign-in cookie usually is; an analytics cookie usually is not. This is general information, not legal advice.
How Reveata uses first-party cookies
By default the Reveata script sets two first-party cookies on your own domain:
| Name | Lifetime | Contents |
|---|---|---|
_dt_v |
Up to 400 days | A random visitor id and a visit counter |
_dt_s |
30 minutes, renewed on activity | A random session id and the time of the last activity |
They contain no personal details and are never shared between websites. The script writes them on the broadest domain the browser accepts, so www, app and blog subdomains share one visitor (Track subdomains). Because the visitor id is stable, Reveata can pass it into your checkout and credit the payment to the visit that brought the customer.
If you would rather set no cookies, switch on cookieless mode. Nothing is then stored in the browser, at the cost of counting a returning visitor as new on another day. Full details are in Privacy, cookies and cookieless mode.