Tracking Cookies Explained: First-Party vs Third-Party

A cookie is a small piece of text a website stores in your browser so it can recognise you later. Cookies that keep you logged in or remember your cart are useful. Tracking cookies, usually set by third parties embedded in pages, follow you across different sites to build an advertising profile. You can block most of the second kind and keep the first.
How cookies work
When you visit a site, it can ask your browser to store a cookie containing a short identifier. Each later request to that site includes the cookie, so the site knows it is the same browser. That mechanism is how login sessions, language choices and shopping carts persist, since the web itself has no memory between page loads.
First-party vs third-party
A first-party cookie is set by the site you are visiting. It usually serves that site’s own functions: sessions, preferences, basic analytics.
A third-party cookie is set by a different domain whose content is embedded in the page, such as an ad network, social button or analytics tool. If the same third party is embedded across thousands of sites, its cookie lets it recognise you on all of them and assemble a history of what you read and buy.
Many browsers now block or restrict third-party cookies by default, which has pushed trackers toward other techniques, including first-party tracking scripts, link decoration and fingerprinting.
What the cookie banner is asking
Banners usually list categories: strictly necessary, functional, analytics and advertising. Necessary cookies keep the site working and generally do not need consent. The others are optional in many regions.
- Choose reject or only necessary when offered.
- Be wary of designs that hide the reject button behind extra clicks; such patterns exist, and you can still use the settings link.
- Remember that your choice is itself stored in a cookie, so clearing cookies brings the banner back.
How to limit tracking
- Block third-party cookies in browser settings. A few sites that rely on them for logins may need an exception.
- Use a tracker-blocking feature or content blocker to stop scripts that set cookies in the first place.
- Clear cookies periodically, or set the browser to clear them when you close it for sites you do not trust.
- Use separate browser profiles for different activities.
- Review ad settings in major accounts to reduce personalised advertising tied to your login.
- Log out when you finish. Signed-in sessions let a platform connect your browsing to your identity.
Beyond cookies
Blocking cookies is necessary but not sufficient. Trackers also use local storage, tracking pixels in emails, URL parameters that carry identifiers, device advertising IDs on phones and fingerprinting. A layered approach, rather than a single cookie setting, is what actually reduces tracking.
Cookies and the law
Several privacy regimes, including the European GDPR and ePrivacy rules, require sites to get consent before setting non-essential tracking cookies. Other regions emphasise opt-out rights instead. Requirements differ, so a banner you see in one country may not appear in another.
Setting up cookie controls in five minutes
Open your browser’s privacy settings, choose the option that blocks third-party cookies, and enable the built-in tracker or content-blocking feature at its standard or strict level. Then decide whether the browser should clear cookies on exit. Finally, visit a site you use often to see whether anything has broken; if so, add an exception for that site only rather than weakening everything.
Why advertisers still find you
Advertisers do not depend on one technique. If cookies fail, they may rely on logged-in identifiers such as hashed email addresses, device advertising IDs in apps, or signals shared between partners. Understanding this prevents false confidence: reducing cookies is helpful, but pairing it with account-level ad settings and app permission limits produces better results.
Quick reference: cookie lifetimes
Session cookies disappear when you close the browser, while persistent cookies stay until an expiry date, which can be months or years. Tracking cookies are often persistent so they can recognise you on return visits. Setting your browser to clear data on exit shortens the life of both types and limits how long a profile can be built from a single identifier.
Practical examples
Imagine reading a recipe site that embeds an ad network. The network sets a cookie, and the next day a news site with the same network recognises you and shows kitchen ads. Neither site shared your name; the shared identifier did the job. Blocking third-party cookies breaks that chain, while rejecting optional cookies on banners prevents the first site from adding extra trackers in the first place. Seeing the chain makes the settings easier to remember and explain.
Frequently asked questions
Are all cookies bad?
No. Session and preference cookies make the web usable. The privacy concern is mainly third-party tracking cookies and the profiles built from them.
Will blocking cookies break websites?
Sometimes. Logins and carts rely on first-party cookies, so keep those allowed. Block only third-party cookies and add exceptions where needed.
Does clearing cookies make me anonymous?
No. Sites can still recognise you through fingerprinting, your IP address and logged-in accounts. Clearing cookies resets only one identifier.
Key takeaways
- First-party cookies serve the site you visit; third-party cookies enable cross-site tracking.
- Block third-party cookies and reject optional ones on banners.
- Trackers also use fingerprinting, pixels and device IDs.
- Logging out and using profiles reduces profile linking.


