First-Party vs Third-Party Cookies: The Difference and Why It Matters for Ad Tracking
First-party and third-party cookies are defined by where they are used, not by what they contain. This guide explains the difference, how each major browser treats them, which advertising cookies fall on which side, and what that means for conversion tracking.
In short
A first-party cookie belongs to the site in the address bar; a third-party cookie belongs to a different site whose content is loaded on that page. The same cookie can be either, depending on context. Safari and Firefox block or partition third-party cookies by default, so ad tracking now depends on first-party cookies, click IDs and data you collect yourself.
Your tracking vendor says it uses first-party cookies, your privacy team asks whether that means no consent is needed, and your ad platform's reports keep drifting further from your sales data. All three conversations depend on understanding what makes a cookie first-party or third-party, and the answer is less obvious than the names suggest. This guide explains the difference, how browsers treat each type today, and what it means for measuring ads.
The difference is context, not the cookie
WebKit's tracking prevention documentation makes the point clearly: there is no special kind of cookie that constitutes a third-party cookie. What matters is the relationship between the cookie's site and the page the visitor is on. If you visit news.example and the browser sends or stores a cookie for news.example, that is first-party. If the same page loads an image or script from adtech.example and the browser sends or stores a cookie for adtech.example, that is third-party, because adtech.example is not the site in the address bar.
The same cookie can be both. A cookie set by adtech.example is first-party when you visit adtech.example directly and third-party when adtech.example content loads inside someone else's page. That is exactly what made third-party cookies useful for advertising: one ad server, present on thousands of sites, could recognise the same browser everywhere.
How browsers treat each type
| Browser | Third-party cookies | First-party cookies |
|---|---|---|
| Safari | Blocked by default | Allowed, but cookies set by JavaScript are capped and can be deleted after periods without interaction |
| Firefox | Partitioned per top-level site by Total Cookie Protection | Allowed; known trackers also blocked by tracking protection lists |
| Chrome | Allowed by default; blocked in Incognito or if the user chooses | Allowed |
| Edge | Tracking prevention blocks some trackers by default | Allowed |
This reflects MDN's summary of third-party cookie handling at the time of writing; browser behaviour changes, so check the linked documentation before relying on any one detail. Partitioning, used by Firefox, deserves a word: instead of blocking a third-party cookie, the browser gives it a separate cookie jar for each site it appears on. The ad server can still set a cookie, but it cannot recognise the same browser across different sites. Cookies with the Partitioned attribute (CHIPS) opt into the same model in browsers that support it.
Two further points from MDN are worth knowing. First, visitors can loosen or tighten these defaults: Firefox, Chrome and Edge let users allow third-party cookies for particular sites, while Safari only offers a switch for cross-site tracking prevention as a whole, with per-frame access granted in code through the Storage Access API. Second, browser extensions such as ad blockers can block third-party cookies, and often the tracking scripts themselves, even in Chrome. So the Chrome row in the table describes the default, not what every Chrome visitor actually experiences.
Which advertising cookies are which
Ad platforms adapted years ago by moving their key identifiers into first-party cookies set by their scripts on your domain. Google's consent mode documentation, for example, distinguishes third-party cookies previously set on google.com and doubleclick.net from first-party conversion cookies such as _gcl_*. The common ones look like this.
- Meta _fbp: first-party browser identifier set by the Meta Pixel on your domain.
- Meta _fbc: first-party cookie holding the fbclid click ID from the landing URL, covered in our guide to fbclid, _fbc and _fbp.
- Google _gcl_aw and related _gcl cookies: first-party cookies written by the conversion linker to store Google click IDs, explained in our guide to gclid, gbraid and wbraid.
- Google Analytics _ga: first-party client identifier for GA4.
- Cookies on ad platform domains themselves: third-party when their content loads on your site, and blocked or partitioned in most browsers outside Chrome.
Why first-party is not the end of the story
Moving to first-party cookies solved the blocking problem but not the lifetime problem. Safari's Intelligent Tracking Prevention caps persistent cookies written by JavaScript, which is how most pixel cookies are created, and shortens that cap further when the visitor arrives from a classified tracker with a decorated URL. It can also delete script-writable storage after days without user interaction. A purchase that happens two weeks after the ad click may find the click ID cookie already gone. Our guide to Safari ITP cookie lifetimes covers the exact rules from WebKit's own documentation.
How the cookie is set matters as much as whose it is. MDN's Set-Cookie reference covers the attributes: Domain controls which hosts receive it, Secure limits it to HTTPS, HttpOnly hides it from JavaScript, SameSite restricts sending on cross-site requests, and Partitioned opts into a per-site jar. Cookies set in an HTTP response by your own server are treated differently from cookies written by a script in Safari, provided the server is genuinely yours and not a third party behind a CNAME record, which WebKit also caps.
Cookies and your own domains
First-party means first-party to one site. If your marketing site is brand.example and checkout runs on pay.brand-shop.example, a cookie on one is invisible on the other. Subdomains of the same registrable domain can share cookies when the Domain attribute is set to the parent, but separate domains cannot. That is why analytics tools pass an identifier in the URL when visitors cross between your domains, as described in our guide to GA4 cross-domain tracking.
First-party does not mean consent-free
This is the misconception most worth correcting. EU ePrivacy rules and the UK's PECR regulate storing and accessing information on a device, and they do not distinguish between first-party and third-party cookies in that test. An advertising cookie set on your own domain generally needs consent in the same way a third-party one does, unless an exception applies. The ICO's guidance on storage and access technologies covers this in detail. Treat the first-party label as a technical fact about browsers, not a legal status, and confirm your setup with counsel.
What this means for ad tracking
- 1Assume third-party cookies do not work for a large share of your visitors, and do not rely on them for attribution.
- 2Make sure click IDs (gclid, fbclid, ttclid) are captured on landing and stored where your own systems can read them, not only in script-set cookies.
- 3Send conversions with durable identifiers you collect with permission, such as a hashed email at checkout or form submission.
- 4Run the browser pixel and a server-side conversion feed together, with deduplication, so neither one is a single point of failure.
- 5Keep your consent banner honest about first-party advertising cookies too.
The labels first-party and third-party describe who the browser thinks a cookie belongs to. Browsers have decided that third-party cookies are mostly a tracking tool and treat them accordingly. First-party cookies are your foundation now, but they are a shorter-lived and more regulated foundation than the one ad tracking was built on. For a broader view of the alternatives, see cookieless tracking explained.
Frequently asked questions
Is the Meta _fbp cookie first-party or third-party?
First-party. The Meta Pixel script sets _fbp on your own domain, so the browser treats it as belonging to your site. That is why it survives where Meta's own third-party cookies are blocked, though in Safari it is still subject to the limits on cookies set by scripts.
Do first-party cookies need consent?
Being first-party does not exempt a cookie from consent rules. EU ePrivacy rules and the UK's PECR apply to storing information on a device whoever sets it, with exceptions such as cookies strictly necessary for a service the user asked for. Advertising and analytics cookies usually need consent even when first-party. Confirm specifics with your counsel.
Does Chrome block third-party cookies?
Not by default at the time of writing. MDN's documentation notes that Chrome blocks third-party cookies only in Incognito mode or when the user turns on blocking in settings. Safari blocks them by default and Firefox partitions them per site.
Can a first-party cookie be read on another domain I own?
No. A cookie set on shop.example is not readable on checkout-provider.example, even if you own both. Subdomains of the same registrable domain can share cookies if the Domain attribute allows it. For separate domains you pass identifiers in the URL, which is how GA4 cross-domain measurement works.
Sources
Try EndFrame
Add a server-side path for your conversions.
EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.
No credit card required