Skip to content
Glossary

First-party cookie

A first-party cookie is a cookie that belongs to the site shown in the browser's address bar, as opposed to a third-party cookie set by another domain on the page. Most cookie-based analytics store their visitor ID in one.

Updated

Also called: 1st-party cookie, first party cookies

Definition

MDN describes a cookie as first-party when its domain and scheme match the page the user is looking at, and third-party when they don't. If you're on example.com and a cookie is set for example.com, it is first-party. A cookie set for an ad network's domain by an embedded script or iframe on the same page is third-party.

First-party vs. third-party cookies

First-partyThird-party
Belongs toThe site you're visitingAnother domain embedded in the page
Typical usesLogins, carts, preferences, analytics IDsAds, cross-site tracking, some embeds
Browser treatmentGenerally allowed, with limitsBlocked or partitioned by default in Firefox and Safari; Chrome blocks them by default only in Incognito

How analytics use first-party cookies

A cookie-based analytics script creates a random ID the first time someone visits, saves it in a first-party cookie on your domain, and sends it with every hit. On the next visit, days or months later, the same ID comes back and the tool links the visits. That is what makes returning-visitor reports and multi-day attribution possible.

Browsers limit this too. Since Intelligent Tracking Prevention 2.1 in 2019, Safari caps persistent cookies created through JavaScript's document.cookie, which is how many analytics scripts set them, at seven days. A Safari visitor who comes back after more than a week may look brand new.

Linqry sets no cookies

Linqry's tracking script sets no cookies, first- or third-party, and stores nothing on the visitor's device. It identifies visitors on the server with a hash of IP address, user agent and site, keyed with a salt that changes daily and is deleted after two days; raw IP addresses are never stored. The cost is that visitors are unique per day rather than across days. See cookieless tracking and the privacy model.

Being first-party doesn't place a cookie outside privacy rules. In the EU, Article 5(3) of the ePrivacy Directive generally requires consent to store or access information on a user's device, with narrow exceptions, whoever owns the domain. Regulators' guidance is summarized on the consent banner page. This is a description, not legal advice.

Related terms

Frequently asked questions

Are first-party cookies safe?

They're a normal part of how sites work, used for logins, carts and preferences. Privacy questions come from what a cookie stores and how it's used, such as a long-lived ID for tracking, rather than from being first-party.

Does Linqry use first-party cookies for analytics?

No. The tracking script sets no cookies at all. Visitor IDs are computed on the server from a daily-salted hash and are never stored in the browser.

Sources

  1. MDN Web Docs: Third-party cookies (checked Nov 9, 2026)
  2. WebKit blog: Intelligent Tracking Prevention 2.1 (checked Nov 9, 2026)
  3. EUR-Lex: Directive 2002/58/EC (ePrivacy Directive), consolidated text (checked Nov 9, 2026)

Measure your own site without cookies

No card required · 30-day trial · No cookies