What Are Third-Party Cookies?
The short answer: a third-party cookie is a cookie set by a domain other than the website you are visiting, usually by an ad network, social network or analytics service whose code or content is embedded on the page. Because the same third party is embedded on many sites, its cookie lets it recognize your browser across all of them, which is what makes cross-site tracking and retargeting possible. Safari and Firefox block or isolate third-party cookies by default; Chrome still allows them unless you turn them off. In the EU and the UK, a website needs your consent before third-party cookies used for advertising or analytics are set.
First-party and third-party cookies
What makes a cookie first-party or third-party is the domain that sets it, compared with the address in your browser’s address bar:
| First-party cookie | Third-party cookie | |
|---|---|---|
| Set by | The site you are visiting | Another domain embedded on that site |
| Readable by | That site only | The third party, on every site that embeds it |
| Typical uses | Login, cart, language, the site’s own analytics | Advertising, retargeting, cross-site analytics, social media embeds |
| Example | A shop’s cart cookie on its own domain | Google’s IDE cookie on doubleclick.net, Meta’s fr cookie on facebook.com |
The same company can set both. The Meta pixel, for example, sets a first-party _fbp cookie on the shop’s own domain, while Meta’s fr cookie on facebook.com is third-party.
How third-party cookies work
When a page loads a script, an image or a frame from another domain, such as an ad, a “Like” button or a tracking pixel, the browser contacts that domain. The response can set a cookie for that domain, and on later requests to it the browser sends the cookie back, whichever site the request comes from. So if the same ad network is embedded on a news site, a recipe site and an online store, it sees the same cookie on all three and can build a profile of the browser’s visits.
Which browsers block third-party cookies
- Safari has blocked all third-party cookies by default since 2020, through Intelligent Tracking Prevention.
- Firefox isolates them by default with Total Cookie Protection: each site gets its own separate cookie jar, so a third party cannot follow you from one site to another.
- Brave blocks them by default.
- Chrome allows them by default, except in Incognito mode. Google planned for years to phase them out, but in April 2025 it decided to keep third-party cookies and leave the choice to users, and in October 2025 it retired most of the Privacy Sandbox technologies meant to replace them.
- Edge allows them by default, though its tracking prevention blocks some known trackers.
Browsers also support partitioned cookies (CHIPS): third-party cookies that a site embedding a service can still use, such as a chat widget, but that are kept separately for each top-level site and so cannot track across sites.
How to block third-party cookies
- Chrome: Settings, then Privacy and security, then Third-party cookies, and choose to block them.
- Safari: on by default; check that “Prevent cross-site tracking” is enabled in the Privacy settings.
- Firefox: on by default; Enhanced Tracking Protection in the Privacy & Security settings controls it.
- Edge: Settings, then Cookies and site permissions, then Manage and delete cookies and site data, and turn on “Block third-party cookies”.
Blocking third-party cookies rarely breaks ordinary browsing. It can affect some embedded services, such as single sign-on across different domains or older payment and chat widgets.
Do third-party cookies need consent?
In the EU, the ePrivacy Directive requires consent before a website stores or reads cookies that are not strictly necessary, whoever sets them. Third-party cookies are almost always used for advertising, analytics or social media features, so they nearly always need consent, and the website that embeds the third party shares responsibility for the data collected: in Fashion ID (C-40/17, 2019), the Court of Justice of the EU held a site that embedded Facebook’s “Like” button jointly responsible with Facebook for collecting and sending its visitors’ data.
In the UK, PECR works the same way, and advertising cookies need consent.
In the US, there is no general consent requirement, but state privacy laws let visitors opt out of targeted advertising; under California’s CCPA, letting an ad network collect visitors’ data through its cookies for cross-context behavioral advertising counts as “sharing”, which visitors can opt out of.
What blocking means for an online store
Fewer third-party cookies means less cross-site data for retargeting and ad measurement. Advertising platforms have answered with first-party cookies set on the store’s own domain and server-side tracking, such as Meta’s Conversions API and Google’s enhanced conversions. These do not remove the need for consent: the data still describes your visitors and still goes to the platform for advertising. Our guide to replacing third-party cookies covers the alternatives in more detail.
How Pandectes helps
Pandectes GDPR Compliance scans your store and lists every cookie with the domain that sets it, so you can see which are first-party and which are third-party. Auto-blocking holds back third-party scripts, and the cookies they set, until the visitor consents, and the choice is passed to Shopify and to Google Consent Mode. Whether a store complies still depends on how the banner is configured and which tools the store uses.
Frequently asked questions
What is a third-party cookie, in simple terms? A cookie that belongs to a company other than the website you are on, such as an ad network whose ad appears on the page. It lets that company recognize your browser on every site where it is present.
What is the difference between first-party and third-party cookies? A first-party cookie is set by the site you are visiting and only that site can read it. A third-party cookie is set by another domain embedded on the page, and that domain can read it on every site that embeds it.
Should I block third-party cookies? Blocking them limits tracking across sites and rarely breaks ordinary browsing. Some embedded services, such as cross-domain logins, may need them; most browsers let you allow them for specific sites.
Is Google getting rid of third-party cookies? No. Google planned to phase them out of Chrome, but in April 2025 it decided to keep them and let users choose in Chrome’s settings. Safari and Firefox already block or isolate them by default.
Are third-party cookies illegal under the GDPR? No, but in the EU a website needs the visitor’s consent before setting cookies that are not strictly necessary, which covers nearly all third-party cookies. The GDPR also applies to the personal data they collect.