First-party cookies
A first-party cookie is a small piece of data set by the website you're on, under its own domain, and readable only by that site. Sites use them for logins, carts, preferences and analytics. A third-party cookie is set by a different domain embedded in the page, such as an ad network. Browsers increasingly block third-party cookies; first-party cookies still work.
By the Onfus teamUpdated 17 November 2026
First-party cookies
- Definition
- Cookies set by the website you're visiting, on its own domain, readable only by that site.
What are first-party cookies used for?
Keeping you signed in, remembering a cart or language, and, for many analytics tools, recognising a returning visitor. Analytics cookies are first-party when the script stores the ID under the site's own domain.
| First-party | Third-party | |
|---|---|---|
| Set by | The site you're visiting | Another domain embedded in the page |
| Read by | That site only | The other domain, across many sites |
| Typical use | Login, cart, preferences, analytics | Ad targeting, cross-site tracking |
| Safari default | Allowed | Blocked since March 2020 |
- Set by
- First-partyThe site you're visiting
- Third-partyAnother domain embedded in the page
- Read by
- First-partyThat site only
- Third-partyThe other domain, across many sites
- Typical use
- First-partyLogin, cart, preferences, analytics
- Third-partyAd targeting, cross-site tracking
- Safari default
- First-partyAllowed
- Third-partyBlocked since March 2020
First-party vs third-party cookies
Questions about first-party cookies.
Do first-party cookies need consent?
Under the EU ePrivacy Directive, storing information on a visitor's device needs consent unless it's strictly necessary for a service they asked for. A login cookie is usually strictly necessary; an analytics cookie usually isn't. This is general information, not legal advice.
How does Onfus handle it?
Onfus sets no cookies by default. If you switch on revenue attribution, it sets one first-party cookie, onfus_visitor, so your checkout can pass the visitor key to Stripe and the payment can be tied to its first visit.
Are first-party cookies safe?
Sources
Read on 17 November 2026. Follow the links for the current wording.
Know what to fix by tomorrow.
Paste one line and start tracking in a minute. See where visitors drop off and what to fix. Free for 14 days, no cookie banner.