Third-Party Cookies: Browser Rules, Examples and Tracking Impact

A third-party cookie is a cookie set or accessed by content from a different site than the one being visited. It can support embedded functionality or recognition across websites, depending on browser rules and storage scope. Identify the actual cookie context before changing tracking, because first-party cookies, partitioned cookies and cross-site access behave differently.

Jafrin Akter AloLast updated 10 min read
On this page

The examples below use fictional sites and describe storage context, not permission to collect or use particular data.

Third-party cookie contexts
Cookie contextIllustrative exampleState availabilityImplementation check
First-partyA session cookie for the shop currently being visitedAvailable within its permitted cookie scopeSession, expiry and security attributes
Unpartitioned third-partyAn external widget accessing its cookies while embedded on another siteMay connect activity across sites when the browser permits accessBrowser blocking and approved access flow
Partitioned third-partyA widget storing a separate session for each top-level siteIsolated by the top-level site's partitionCorrect isolation and supported browser behavior

There is no special cookie file type called “third-party.” The relationship between the visited site and the resource using the cookie determines the context. WebKit's terminology describes both sending an existing cookie with a third-party request and accepting a new cookie from that response. WebKit tracking-prevention terminology

At Martechdevs, we would identify the feature and data dependency before replacing a cookie-based integration. Our analytics and tracking implementation service connects that inventory to consent, browser behavior and the business report that must remain useful.

A divided white storage jar keeps lime and pink tokens in separate compartments beneath a cobalt lid beside the Third-Party Cookies headline.

First-party and third-party relationships

Imagine a visitor opens shop.example and the page embeds content from support-widget.example. A cookie belonging to the shop is used in a first-party context there. A cookie belonging to the embedded support service is used in a third-party context when that service reads or sends it inside the shop.

The same support service can be first-party when the visitor opens its own site directly. The classification follows the current browsing context. The provider's business model and commercial relationship with the shop do not determine it.

A different hostname also does not automatically mean a different site. Subdomains can belong to the same registrable site. Scheme-aware rules can additionally distinguish HTTP from HTTPS. Document the actual top-level site, resource host and protocol rather than classifying a cookie from a vendor name alone. MDN third-party cookie guide

An external JavaScript file is another common source of confusion. Downloading a script from a vendor does not by itself determine the cookie's party. The script's execution context and the cookie's domain and access path matter. Inspect the storage entry and request rather than assuming that all cookies created by analytics software are third-party cookies.

This distinction helps a marketing team ask a useful implementation question: which feature requires cross-site state, and what happens when that state is unavailable? A broad request to “remove third-party tools” can miss a first-party identifier while breaking an unrelated embedded feature.

Current browser treatment

Chrome has not followed a universal third-party-cookie shutdown timetable. Google announced that it would maintain user choice in Chrome's settings and would not introduce the previously discussed standalone cookie prompt. Its current help still describes allow, block and site-exception controls, with third-party cookies blocked by default in Incognito. Google's cookie-choice update and Chrome cookie settings

Safari and Firefox have different approaches, and partitioned storage needs separate treatment.

Current browser treatment
Browser contextDocumented treatmentEvaluation consequence
Chrome normal browsingUser-configurable third-party-cookie controls and exceptionsRecord the actual setting used in the test
Chrome IncognitoThird-party cookies blocked by defaultA normal-mode pass does not establish private-mode behavior
Firefox standard protectionTotal Cookie Protection separates cookie storage by visited siteShared cross-site state cannot be assumed
Safari with current CHIPS supportCross-site cookies without requested partitioning are blocked; partitioned cookies have site scopeTest the supported partition or access mechanism

Firefox's Total Cookie Protection maintains a separate cookie jar for each visited website. That is more precise than saying every third-party cookie is treated identically or that all cookies disappear. Mozilla Total Cookie Protection

Safari's version history matters for embedded features. WebKit says CHIPS returned in Safari 26.2 after an earlier implementation was removed for refinement. Its current description distinguishes partitioned access from unpartitioned cross-site cookies and points to the Storage Access API for the latter. Include the actual browser version in acceptance evidence. Safari partitioned-cookie support

Google also announced retirement of several Privacy Sandbox technologies, including Topics, Protected Audience and Attribution Reporting, while continuing support for CHIPS and FedCM. Do not treat an older Privacy Sandbox roadmap as a guaranteed current replacement for advertising measurement or identity. Verify the particular API and supported deployment path being proposed. Privacy Sandbox technology update

Cookie attributes describe how a cookie can be stored and sent. They do not override every browser privacy control.

Cookie attributes and browser policy
AttributeMain purposeCommon interpretation error
DomainDefines permitted domain scopeA vendor can set a cookie for any unrelated website
PathLimits the request paths that receive the cookiePath is a complete access-security boundary
SecureRestricts transmission to a secure connection, with specified browser exceptionsThe cookie therefore has no privacy implications
HttpOnlyPrevents access through browser JavaScriptThe cookie cannot be sent in requests
SameSiteControls eligible cross-site sending contextsNone guarantees acceptance despite browser blocking
PartitionedRequests storage isolated by a top-level-site keyThe same identifier is available across unrelated sites

MDN's Set-Cookie reference defines these controls. In particular, HttpOnly concerns script access while the browser can still send the cookie with applicable requests. A cookie's absence from document.cookie therefore does not prove that the request is anonymous. Set-Cookie attributes

SameSite=None is commonly needed for a cookie intended for embedded cross-site use, and it requires Secure. That combination expresses the intended sending context; browser blocking, partitioning and access permission can still affect the result. Check the browser's stored-cookie and request evidence rather than changing attributes until a warning disappears.

Use HTTPS and suitable attributes for the feature's security requirements. Avoid copying a session-cookie example into production without checking domain, path, lifetime and the application's authentication design. A functional demo is only one part of the implementation review.

Partitioned cookies and the shared-state limit

CHIPS stands for Cookies Having Independent Partitioned State. It lets content opt into cookie storage separated by top-level site. The storage key combines the cookie's own host key with a partition key based on the top-level site, including its scheme. MDN partitioned cookies

An embedded support widget can therefore remember a session inside shop.example without exposing that same partitioned session when the widget appears on news.example. The design supports a bounded embedded feature. It does not restore one shared third-party identifier across unrelated sites.

The following small Python model illustrates that isolation with already-normalized site keys. It is a reproducible storage example, not a browser implementation or a substitute for browser acceptance testing.

Python
cookies = {}
widget = "support-widget.example"
shop_key = ("https://shop.example", widget)
news_key = ("https://news.example", widget)

cookies[shop_key] = "shop-session"
assert cookies.get(news_key) is None

cookies[news_key] = "news-session"
assert cookies[shop_key] == "shop-session"
assert cookies[news_key] == "news-session"
assert len(cookies) == 2

The model has two stored sessions for the same embedded service. It makes no claim about the number of people. One person could have visited both sites, and two people could have used different devices. A storage key and a customer identity are different concepts.

This is why a widget-session requirement and a cross-site attribution requirement need separate solutions. If the feature requires a shared signed-in identity, evaluate a supported authentication or storage-access flow with its user interaction and permission requirements. Test refusal and unavailable-access cases as well as the successful path.

Blocking third-party cookies in a controlled test

Use a dedicated test profile or an approved testing environment. Record the browser version, privacy mode, extensions, site exceptions and consent state before comparing outcomes. Existing cookies and previously granted access can make a returning session behave differently from a new visitor.

  1. List the embedded features and requests on the journey being tested.
  2. Identify which feature depends on unpartitioned, partitioned or first-party state.
  3. Start with a clean profile and the documented cookie setting.
  4. Complete the login, embed, form or purchase journey using controlled records.
  5. Inspect relevant request cookies, response Set-Cookie headers and storage entries.
  6. Repeat with third-party cookies blocked and with the required consent states.
  7. Record the functional difference and the exact blocked or partitioned dependency.

Chrome's documented desktop route is Settings, Privacy and security, then Third-party cookies. Its site exceptions can change the result, so include them in the record. The purpose is to reproduce the user's environment, not to recommend weakening a real user's privacy setting to make a product work.

Test both a new session and a return visit. Also test the same embed on a second unrelated top-level site if partition isolation is part of the design. A successful return visit to the first site does not establish shared access on the second.

Browser cookie permission and the website's consent choice are separate controls. A browser can permit storage while the site's approved consent configuration still requires a tag to remain inactive. A browser can also block storage after the visitor accepts a banner. Record both states.

Google Consent Mode adds another distinction: its advanced implementation can send measurements without cookies while consent is denied. Seeing a request therefore does not establish that a third-party cookie was read or that a persistent identifier was stored. Inspect the request contents and storage behavior for the selected implementation. Google Consent Mode

The Consent Mode v2 guide covers that implementation. The cookieless tracking guide compares approaches to measurement without persistent analytics cookies.

Server-side forwarding changes where a request is processed. It does not automatically create a stable, permitted customer identity or remove the source browser's limitations. Identify the event, identifier, consent state and destination at each stage of the flow. Use server-side tracking guidance when that architecture is part of the proposed change.

For campaign diagnostics, keep the test links consistent with the UTM checker. Valid campaign labels help compare the same arrival path across browser states. The actual cookie, consent and identity observations still come from the controlled journey.

Third-party-cookie failure diagnostics
SymptomPossible causeEvidenceRepair direction
Embed works only after a direct visit to its providerDependence on existing unpartitioned provider stateClean-profile and direct-visit comparisonSupported embedded authentication or access flow
Widget remembers state on one site but not anotherExpected partition isolationTop-level site and partition keySite-scoped design or explicit identity requirement
Cookie appears in storage but is absent from a requestScope, SameSite, expiry or browser policyRequest context and cookie attributesCorrect the intended scope and supported access
Cookie is absent from document.cookie but requests include itHttpOnly access restrictionBrowser storage and request headersPreserve the security control and inspect the right evidence
Tracking changes after a banner actionConsent mapping or timingConsent state before and after interactionRepair the selected tag behavior and repeat the journey

Avoid treating every missing attribution record as a cookie problem. A lost campaign parameter, duplicate purchase event, changing customer identifier or different report window can produce a similar reporting symptom. Reconcile the accepted business outcome separately from the browser diagnosis.

Dependency and repair workflow

Validation workflow
An embedded-feature inventory branches by shared cross-site state into first-party/partitioned design or a supported identity/access flow. Browser and consent validation repeats after integration repairs, then measurement reconciliation permits a scoped release.
Read diagram as text
  • Embedded-feature inventory to Shared cross-site state.
  • Shared cross-site state to First-party or partitioned design: No.
  • Shared cross-site state to Supported identity or access flow: Yes.
  • First-party or partitioned design to Browser and consent fixture.
  • Supported identity or access flow to Browser and consent fixture.
  • Browser and consent fixture to Accepted feature and storage behavior.
  • Accepted feature and storage behavior to Cookie and integration repair: No.
  • Cookie and integration repair to Browser and consent fixture.
  • Accepted feature and storage behavior to Measurement reconciliation: Yes.
  • Measurement reconciliation to Scoped release
Open full diagram

The consent debugging skill can organize the evidence across visitor choices and tags. Keep the observed browser behavior with the implementation record so later changes are evaluated against the same accepted feature.

Keep reading

Browse all Tracking & Attribution guides

Questions people ask

Is an analytics cookie automatically third-party because a vendor created the script?

An analytics cookie is not automatically third-party because the script came from a vendor. The relevant context is the visited site, the cookie's scope and how the resource accesses or sends it. Inspect the actual storage entry and request. A remotely hosted script can participate in a first-party implementation, while an embedded cross-site resource can depend on third-party state.

Does Chrome's cookie-choice approach mean every visitor allows third-party cookies?

Chrome's cookie-choice approach does not mean every visitor allows third-party cookies. Users can block them or configure site exceptions, and Incognito blocks them by default. Test the actual settings relevant to the audience. A successful journey in one normal browsing profile should not be treated as evidence for private browsing, a managed configuration or a visitor with different privacy controls.

Can a partitioned support-widget cookie identify the same visitor across unrelated shops?

A partitioned support-widget cookie is isolated by top-level site, so the same cookie cannot simply be reused across unrelated shops. The widget can maintain separate site-scoped sessions where supported. If the business needs a shared signed-in identity, evaluate a supported identity flow separately and test its permissions and fallback. Two widget sessions alone do not establish two distinct people.

Does SameSite=None override a browser's third-party-cookie block?

SameSite=None does not override a browser's third-party-cookie block. It specifies a cross-site sending context and requires Secure, while browser policy and supported access mechanisms still determine availability. Inspect the request, response and stored cookie together. Repeatedly changing the attribute cannot replace a design for blocked storage, partitioned state or an explicit authentication requirement.

Can an HttpOnly cookie be active when JavaScript cannot read it?

An HttpOnly cookie can be active while JavaScript cannot read it. HttpOnly restricts script access, but the browser can send the cookie with requests that satisfy its scope and other rules. Use browser storage and network evidence to inspect that behavior. Removing HttpOnly merely to make a diagnostic script see the value would change the security design.

Sources

  1. WebKit tracking-prevention terminology
  2. MDN third-party cookies
  3. Google's Chrome cookie-choice update
  4. Chrome cookie settings
  5. Mozilla Total Cookie Protection
  6. Safari 26.2 partitioned-cookie support
  7. Privacy Sandbox technology update
  8. MDN Set-Cookie attributes
  9. MDN partitioned cookies
  10. Google Consent Mode overview
Portrait of Jafrin Akter Alo

Written by

Jafrin Akter Alo

Data Engineer and Co-founder at Martechdevs and Growth and Analytics Partners

Jafrin writes practical guides to marketing technology, customer data, analytics and AI workflows. Martechdevs is a Growth and Analytics Partners company.

View LinkedIn profile

Book a Free Call

Thirty minutes on your stack and what it needs. Free, and no pitch.

Thirty minutes, and you leave with a plan

We look at what you have, what it is costing you and what to do about it first.

  • 30 minutes
  • Video call, link on booking
  • No obligation

What we'll cover

  • Your current stack and where it hurts
  • Quick wins we can ship first
  • An integration roadmap
  • Timeline, scope and next steps

Calendar not loading? Open it in a new tab or email hello@martechdevs.com.