Skip to main content
← BlogSERVER-SIDE

First-Party vs Third-Party Cookies: What Actually Changed for Advertisers

First-party cookies are set by your domain; third-party cookies by another domain in your page — and browsers now limit both.

inX

Almost every store owner I audit tells me the same thing: "We're fine, we use first-party data." Then I open Safari, run a test purchase, and the visitor's _fbp cookie is stamped to expire in seven days. Their remarketing window is a week long and nobody in the building knows it.

The first-party/third-party split sounds like a lawyer's distinction. It isn't. It's the fact that explains why your ad platform reports fewer conversions than your backend, and why returning customers keep showing up as brand-new.

The only thing that decides it is the domain setting the cookie versus the domain in the address bar.

If a visitor is on yourstore.com and a cookie gets written for yourstore.com, that's first-party. If the page loads a script or pixel from doubleclick.net or facebook.com and that domain writes a cookie, it's third-party — someone else's domain, readable again when the visitor lands on a different site that loads it too.

That's the whole mechanism. What the cookie is used for doesn't enter into it — browsers only look at the domain.

 First-party cookieThird-party cookie
Set byThe domain the visitor is on (yours)Another domain loaded inside your page
Readable on other sitesNoYes — that's the point of it
Typical jobsLogin sessions, cart, consent choice, your analytics and pixel IDsCross-site retargeting, view-through attribution, frequency capping
Browser status in 2026Allowed, but lifetime capped when written by JavaScriptBlocked by default in Safari and Firefox; restricted and de-prioritized in Chrome

Are third-party cookies actually dead in 2026?

For most of your traffic, yes — and it happened years before the headlines. Safari has blocked third-party cookies by default since 2020 through WebKit's Intelligent Tracking Prevention. Firefox has blocked known third-party tracking cookies since 2019 and now isolates the remaining ones so a cookie set on one site can't be read on another.

Chrome is the one people wait on, and Google's plan there has been rewritten more than once — a hard deprecation deadline, then a user-choice model, then further changes. The honest version: the direction is away from cross-site cookies, the timeline keeps moving, and nobody should build a measurement plan that assumes third-party cookies come back. Chrome's position has changed more than once, so check its current published stance rather than trusting any article's date-stamped claim — including this one.

Three columns comparing third-party cookies, JavaScript-set first-party cookies capped at seven days by Safari ITP, and durable server-set first-party cookies.
The split that matters isn't first- versus third-party; it's whether a script or your server wrote the cookie.
Third-party cookieScript-set first-partyServer-set first-party
Set by doubleclick.net or facebook.comWritten through document.cookieWritten in the HTTP response header
Blocked by default in Safari and Firefox_fbp, _fbc and _ga live hereSet on your own subdomain
Restricted and isolated in ChromeSafari ITP cuts it to seven daysNot subject to the ITP script cap
Readable when you land on other sitesCNAME-cloaked hostnames get capped tooOutlives the consideration cycle

Why is "we're already first-party" usually wrong?

Because the cookies that matter to your marketing are written by JavaScript, and Safari caps those to seven days no matter whose domain they're on. This is the part almost everyone misses.

WebKit's ITP treats a cookie differently depending on how it was created. A cookie set through document.cookie — how the Meta Pixel writes _fbp and _fbc, and how GA4 writes _ga — gets its lifetime cut to seven days in Safari, and shorter still in some cross-site cases. A cookie set by your own server in the HTTP response header isn't subject to that script cap.

So "first-party" isn't one thing. Script-set first-party expires in a week on a big slice of your traffic. Server-set first-party is the durable identifier everyone assumes they already have.

Timeline showing an ad click on day zero writing _fbp, Safari expiring the script-set cookie on day seven, a purchase on day twelve, and the buyer counted as a brand-new user.
Long consideration cycles look like they never convert from ads, because the identifier died first.
  1. Day 0: the ad click — _fbp written by document.cookie
  2. Day 7: Safari ITP — Script-set cookie hits the 7-day cap
  3. Day 12: the purchase — Same shopper, no cookie left to match
  4. Counted as a new user — No attribution, and the list member is gone

What does this change for you in practice?

Three things, and you're probably seeing all three already.

  1. Your attribution window collapses. A seven-day cookie can't credit a purchase that happened on day twelve. Long consideration cycles — furniture, B2B, high-ticket coaching — look like they don't convert from ads at all.
  2. Returning visitors show up as new. Someone browses, comes back three weeks later, buys. With an expired cookie that's two unrelated strangers, and your new-vs-returning split and conversion rate are both quietly wrong.
  3. Remarketing lists shrink. Audiences built on browser cookies leak members every week. Smaller pools, and worse lookalikes built on top of them.
One first-party hit to data.yourstore.com sets a server-written cookie and forwards clean events to GA4, Meta CAPI, Google Ads Enhanced Conversions and TikTok Events API.
Nothing in this chain depends on a third-party cookie, so the next browser change doesn't reset your measurement.
LayerWhat sits there
InputsOne hit to your own subdomain, Cookie set in the HTTP response, gclid and fbclid from the click, Hashed email at checkout
data.yourstore.comYour server sets the durable cookie, then forwards clean events to each platform API
DestinationsGA4, Meta Conversions API, Google Ads Enhanced Conversions, TikTok Events API

Why does first-party server-side tracking fix this?

Because it moves both halves of the problem — the cookie and the event — off the browser's turf.

Here's the plain-language version if the term is new to you. Right now, tracking scripts run inside your visitor's browser and send data straight to Meta, Google, and TikTok from there. The browser is the middleman, and the browser is the thing shortening your cookies and blocking those requests. Server-side tracking puts a small collection endpoint on your own domain — something like data.yourstore.com, an actual subdomain you control, not a redirect to a vendor. The browser talks only to you. Your server then forwards clean events to each ad platform through their APIs: Meta's Conversions API, Google Ads Enhanced Conversions, GA4, TikTok Events API.

What that buys you against this specific problem:

  • Cookies your server sets, not your scripts. Written in the HTTP response on your own domain, so they aren't cut to seven days by the ITP script cap. Your identifier survives the shopping cycle instead of the week.
  • Longer, more honest attribution. Returning visitors stay recognizable, so day-14 and day-30 purchases get credited to the campaign that earned them.
  • Events that arrive even when the pixel doesn't. Ad blockers and browser restrictions take out browser-side requests; the server call still lands, with the real IP, user agent, and click IDs attached. Higher match quality, so platforms optimize on real conversions and your CPAs come down.
  • One setup that outlives the next browser change. You're not betting on what Chrome decides, because nothing in the chain depends on a third-party cookie.

That's the fix — not a workaround. It's how measurement works once you accept the browser isn't on your side.

Frequently asked questions

GA4's _ga cookie is first-party — it's set on your domain, not Google's. But it's written by JavaScript, so Safari caps it to seven days, which is why returning-visitor numbers in GA4 look inflated on iOS traffic.

The pixel sets _fbp and _fbc as first-party cookies on your domain, and it can also use Meta's own third-party cookie when the browser allows it. On Safari and Firefox the third-party half is gone and the first-party half expires in about a week.

Under GDPR, analytics and advertising cookies need consent regardless of who set them — first-party is a technical property, not a legal exemption. Strictly necessary cookies, like a cart cookie, don't.

Does server-side tracking stop working without third-party cookies?

No. It identifies visitors with first-party cookies set on your own domain and passes hashed customer data to platforms. Third-party cookies aren't part of the chain.

You can set a two-year expiry and Safari will still overwrite it to seven days for script-set cookies. The expiry you request and the expiry the browser honors are different numbers.

Will my ad platform reporting change after I switch to server-set cookies?

Usually yes, upward — more conversions get attributed because visitors stay identifiable past a week. Expect platform numbers to move closer to your backend over a few weeks, not instantly.

  • cookies
  • privacy
  • glossary
  • first party
SETUP GUIDES

Guides for this topic

How accurate is your conversion tracking?

PLATFORM-REPORTEDconversionsdivided byBACKENDreal orders or leadsequalsaccuracy
TRY IT · YOUR NUMBERS
68%Broken. Something is missing entirely. Worth a free audit.
Reading guides because something is broken?Book 30 minutes with Ariful. We'll find it on the call and send a written fix list within 24 hours.
Get my free audit →
Ariful Islam
WRITTEN BYAriful IslamFounder of Tracking Consulting and a computer engineer (Diploma, BSc, MSc in CSE). 300+ clients and 1,000+ tracking projects since 2019.
About Ariful →
FREE · 30-MIN CALL · WRITTEN AUDIT IN 24H

Want us to check your accuracy for you?

We look at your setup together on the call. Within 24 hours you get a written audit and a prioritized fix list you can hand to any developer. Not a fit? We'll say so.