Tracking Cookies: How They Work, Types and What Replaces Them

28 min read

Tracking cookies let advertisers recognize a browser from one visit to the next, and sometimes from one site to the next. This guide explains how they work, how browsers and privacy laws treat them in 2026, how to check your own site, and what marketers use instead.

3 key takeaways
  1. “Tracking” describes what a cookie does, not a special file type. A cookie becomes a tracking cookie when it carries an ID and is used to recognize a browser over time or across sites. Banners call the advertising kind “marketing cookies”.
  2. Browsers no longer agree. Safari and Firefox block or isolate third-party cookies by default. Chrome still allows them by default as of November 2026. Your numbers will differ by browser.
  3. First-party setups and clean consent are the safe base. Own your measurement on your domain, build first-party data you collect with permission, load marketing tags only after consent, and test it yourself.

Tracking cookies are small text files stored in a browser that carry a unique ID, so a website or ad company can recognize that browser later. Marketers use them to count returning visitors, link ad clicks to sales, build audiences and show retargeting ads. The tracking cookies meaning in plain words: a name tag your browser wears, which companies read each time they see it again.

Most guides on this topic are written for consumers (how to delete cookies) or for compliance teams (how to build a banner). Neither explains the marketing side well: what the cookie does inside an ad platform, why your reports never match, and what changes when a browser blocks it. This guide covers that, in order.

What you will walk away with

A clear model of cookie types, a step-by-step view of how a retargeting ad reaches the right browser, a browser-by-browser table, a cookie audit you can run in Chrome in ten minutes, and a plan for life with fewer third-party cookies.

Part of a series

This guide is part of our series on tracking. For the full picture of retargeting, consent and first-party data, read the main guide: What Is the Digital Marketing Strategy That Tracks Users Across the Web? For the data you can collect and own once cookies fade, continue with how to use first-party data in marketing.

What tracking cookies are, and how they differ from marketing cookies

A cookie is a small piece of text that a website asks your browser to store. It usually holds a name, a value, a domain and an expiry time. Many cookies are harmless and useful. They keep you logged in or remember your cart.

A cookie turns into a tracking cookie when its value is a unique ID and someone uses it to follow behavior. That could be one site watching your return visits, or an ad network spotting the same browser on many sites. Web tracking cookies of the second kind are the ones people worry about.

You will also see “marketing cookies” and “advertising cookies”. These are labels, mostly from consent banners. The next table shows how the terms overlap.

Cookie labels and what they usually mean
TermWhat it describesTypical purposeWhere you see it
Tracking cookieBehavior: any cookie with an ID used to follow a browserRecognize returning or cross-site visitorsPrivacy guides, browser settings
Marketing cookieA banner category for cookies used in marketing and adsRetargeting, conversion tracking, audience buildingCookie banners, consent platforms
Advertising cookieNearly the same as marketing cookie; often tied to an ad platformShow, limit and measure adsPlatform cookie policies
Analytics cookieCounts visits and behavior on your own siteReporting and site improvementBanner “statistics” or “analytics” category
Anatomy of a cookie
Name_fbpWhat the cookie is called
Valuefb.1.1767225600.4821The unique ID. This is what tracks
Domainshop.exampleWho can read it
Expires90 daysHow long it lives
SecureYesSent over HTTPS only
SameSiteLaxWhen it travels across sites
Example values for illustration. Open the Application tab in Chrome DevTools to see the real ones on any site.

So the difference between tracking cookies and marketing cookies is mostly about angle. “Tracking” describes the technique. “Marketing” describes the business purpose and the consent category. Cookie IDs also sit on the passive side of a customer’s digital footprint, the data people leave behind without typing anything.

What information do tracking cookies collect?

The cookie itself usually holds only the ID. The detail sits on the server of whoever reads it. Linked to that ID, companies typically record the pages and products viewed, clicks and searches, the ad or link that brought the visit, the device, browser and rough location, how often the browser returns, and any purchase. This trail is often called clickstream data. A name or email is not stored in the cookie, but it can be joined to the ID later if the visitor logs in or fills a form. Until that happens the visitor stays anonymous, and there are ways to identify anonymous website visitors before they ever fill in a form. That is why cookie IDs often count as personal data, or PII (personally identifiable information), in privacy law.

Cookie types marketers should know

Cookies are sorted in four useful ways. One cookie can sit in several groups at once. For example, a Meta Pixel cookie is first-party, persistent and a marketing cookie.

First-party vs third-party cookies

First-party vs third-party cookies in marketing
QuestionFirst-party cookieThird-party cookie
Who sets it?The site you are visitingA different domain loaded on that site, such as an ad network
Who can read it?That site onlyThe company that set it, on every site that loads its code
Marketing useAnalytics, login, cart, conversion tracking, first-party audiencesCross-site retargeting, frequency capping, audience matching
Browser treatmentMostly allowed; script-set ones can be cut short in SafariBlocked in Safari, isolated or blocked in Firefox, allowed by default in Chrome

These are the third party cookies the whole industry argues about. They let one company watch a browser across many unrelated sites. A first-party cookie is only a storage method, though. First-party data is the wider idea: everything customers share with you directly, whether or not a cookie is involved.

Session vs persistent cookies

A session cookie disappears when the browser closes. A persistent cookie stays until its expiry date, which can be days, months or years. Most marketing identifiers are persistent, because remembering a visitor over weeks is the whole point.

How a banner groups cookies

The four categories most banners use
CategoryWhat belongs hereConsent needed in the EU?
EssentialLogin, cart, security, consent recordNo, if truly necessary for a service the visitor asked for
FunctionalLanguage, saved preferences, chat widgetsUsually yes, unless needed for the requested service
AnalyticsVisit counts, behavior reportsYes in most cases
Marketing or advertisingRetargeting, ad conversion, audience cookiesYes

Be strict about “essential”. Regulators read that exemption narrowly, so an analytics or advertising cookie does not qualify just because you rely on it.

Supercookies and zombie cookies

Some trackers try to survive deletion. A supercookie hides in places users rarely clear, such as other browser storage or network-level identifiers. A zombie cookie is rebuilt from a backup copy after you delete it. Browsers have shut down most of these tricks, and regulators treat them as tracking that needs consent.

How tracking cookies work, step by step

Take a shopper who looks at a pair of trainers and later sees an ad for them on a news site. Here is what happens between those two moments.

  1. The site sets a cookie

    On the first visit, the shop’s server or one of its scripts asks the browser to store a cookie with a random ID, for example 7f3a91. The browser keeps it and sends it back on later visits to that domain.

  2. A marketing tag records what you do

    The Google tag, the Meta Pixel or another tag reads the cookie, then sends the ID and the event (product viewed, cart added) to the ad platform. The platform adds the event to a profile for that ID.

  3. The profile joins an audience

    The shop’s marketer has defined an audience such as “viewed trainers, did not buy in 7 days”. The ID now belongs to it.

  4. The ad network matches IDs

    On the news site, the ad network sees its own cookie. Different companies in the chain use different IDs, so they swap them through a process called cookie syncing. Each one learns that its ID and a partner’s ID belong to the same browser.

  5. An auction runs in real time

    While the page loads, the ad slot goes to auction. Advertisers bid for the impression, and the cookie match tells them this browser is one they want. This is real-time bidding, and it finishes in a fraction of a second.

  6. The retargeted ad appears, and the loop closes

    The winning bid serves the trainer ad. If the shopper later buys, a conversion tag reads the same ID and reports the sale back to the platform, so the campaign is credited.

That is how cookies work in digital advertising: one ID, read in several places, joined by partners who share it. It is also why people feel followed, and why browsers and laws target this chain. Our guide to tracking users across the web shows where retargeting fits in the wider strategy.

Cookie syncing in ad tech explained

Each ad company sets its own cookie ID, so two companies cannot recognize the same browser by default. In cookie syncing, one company redirects the browser to another and passes its ID along. The second company stores a match table: “your ID 123 is my ID 987”. After that, both can trade audience data and bid on the same person. This is also called cookie matching, and it is why one ad click can fire a chain of requests to many domains.

How ad networks share cookie data

Networks share IDs in two main ways. Cookie syncing, described above, matches one company’s ID to another’s. An ad exchange is the marketplace where publishers sell ad space and advertisers bid for it. Buying ads through exchanges by software is called programmatic advertising. Each hand-off passes along an ID and a bit of context, which is why one visit can reach many companies.

The cookie settings that matter

1

Expiry

Sets how long the cookie lasts. Short expiry means shorter memory of the visitor, and shorter attribution windows.

2

SameSite

Controls when the cookie travels across sites. Strict sends it only within the same site. Lax also allows normal link clicks. None allows it everywhere, and third-party cookies must use None with Secure to work.

3

Secure

Sends the cookie only over HTTPS. Marketing cookies should always have it.

4

HttpOnly

Hides the cookie from page scripts. Tracking cookies written by JavaScript cannot use it, which is one reason Safari treats them with suspicion.

Cookie expiration and lifespan in marketing

Expiry decides how long a marketing cookie can link visits. Google Analytics 4 keeps its ID for two years by default, while Google Ads and Meta click cookies last about 90 days. A longer lifespan helps you connect a slow buying journey. It also raises the privacy risk, and browsers shorten it anyway. Set the shortest lifespan that still covers your real sales cycle.

SameSite cookie attribute (Lax, Strict, None) in marketing

SameSite decides whether a cookie is sent on requests that start from another site. For marketing it matters most for cross-site tags. A cookie set to Strict stays on your own site. Lax also allows a visitor who arrives by clicking a normal link. None lets the cookie travel on any request, which ad and embed tags need, and it must be paired with Secure. If a conversion pixel suddenly stops recording, a wrong SameSite value is a common cause.

HttpOnly and Secure flags on tracking cookies

The Secure flag keeps a tracking cookie off unencrypted connections. The HttpOnly flag hides it from JavaScript, which protects login cookies if a script is compromised. Most marketing cookies cannot be HttpOnly, because the tag itself has to read them. That trade-off is why you should keep login and session cookies separate from marketing cookies.

How marketers use tracking cookies

Cookies do six jobs in a typical marketing stack.

1

Retargeting and remarketing

Show ads to people who viewed a product or left a cart. Dynamic product ads pull the exact items they looked at.

2

Conversion tracking

Tie a sale or signup back to the ad click that started it. The click ID is stored in a cookie until the conversion happens.

3

Attribution

Follow a person across several visits to credit each touchpoint. Multi-touch models depend on the ID surviving between visits.

4

Audience segmentation

Group visitors by behavior, such as “read the pricing page twice”, then target or personalize for each group. This is behavioral targeting, and it is how cookies make ads feel personal.

5

Frequency capping

Limit how many times one browser sees the same ad, so budget is not wasted and people are not annoyed.

6

Affiliate tracking

Credit a partner when a visitor they referred buys within an agreed window, often stored in a cookie.

Cookies in e-commerce marketing

Online stores lean on cookies more than most. A session cookie remembers what is in the cart as a shopper moves between pages. Persistent cookies power abandoned cart retargeting and dynamic product ads that show the exact items someone left behind. Ad platforms also use the same data to build lookalike audiences: new people who resemble your buyers.

View-through conversionThe person saw the ad but did not click. They converted later, and the platform matched the visit by its own cookie or ID. Less certain, so treat it with care.
Click-through conversionThe person clicked, then converted. The click ID sits in a cookie such as _gcl_aw until the sale. This is the stronger signal.

Affiliate programs work the same way. A partner link sets a cookie, and the program’s cookie duration decides how long that partner earns credit for a sale. It differs by program, so read each program’s terms.

Cookies behind the main ad platforms

Platforms publish their cookie names and lifespans. These are the ones marketers meet most often.

Common marketing cookies and their stated lifespans
CookieSet byTypePurposeStated lifespan
_gaGoogle Analytics 4First-partyTells visitors apart2 years by default, adjustable in settings
_gcl_awGoogle Ads (Google tag, Conversion Linker)First-partyStores the ad click ID for conversion tracking90 days
_fbpMeta PixelFirst-partyIdentifies the browser for ads and analytics90 days
frMeta, on facebook.comThird-partyDelivers, measures and improves ads90 days
90 daysStated life of Google Ads click cookies and Meta’s _fbp and fr cookies.
2 yearsDefault life of the Google Analytics _ga cookie, adjustable in settings.
7 daysSafari’s cap on cookies written by scripts, counted in days of use without a site visit.

The LinkedIn Insight Tag and the TikTok Pixel follow the same pattern: a tag on your site sets or reads an ID so the platform can match ad clicks to actions. Check each platform’s current cookie table for exact names and durations, because they change. For the setup side of each platform’s pixel, including standard events, testing and deduplication with server-side events, see our guide to social media tracking pixels and Conversions APIs.

IP targeting vs cookie targeting

IP targetingTargets a network address. Useful for rough location or a household or office. But addresses are shared and change, so it is blunt for individual behavior.
Cookie targetingTargets a browser ID. Follows behavior over time, whatever the location. But it breaks when the cookie is deleted or blocked, and it cannot see other devices.

Many campaigns use both. IP data adds location context. Cookies add behavior. Both are personal data in many privacy laws. In B2B, tools also match an office IP address to a company and combine it with cookies to link a returning visit to an account. That works at company level and breaks with VPNs and remote work. Our guide on how to identify anonymous website visitors covers this in more detail.

Marketing uses of cookies in detail

The role of cookies in retargeting and remarketing

A cookie marks a browser that viewed a product or left a cart. Ad platforms add that browser to a list, then show it a reminder ad. Remarketing works the same way for email and search lists. Without the cookie, the platform cannot tell a returning visitor from a new one.

How cookies help in audience segmentation

Cookie IDs let you group visitors by behavior, such as readers of pricing pages or buyers of a product line. Each group gets its own ads and offers. Segments are only as good as the ID behind them, so they weaken when cookies are blocked or deleted.

Frequency capping using cookies

The ad server stores a count against the cookie ID and stops showing the same ad after a set limit. It prevents wasted spend and ad fatigue. When the cookie is missing, the cap resets and the same person can see the ad again.

How cookies improve ad personalization

Cookies link past visits, searches and purchases to one ID. Ad platforms use that history to choose the product, message or creative most likely to fit. Personalization is a benefit for relevance, and it is also the reason regulators ask for consent.

How Google Ads uses conversion cookies

When someone clicks a Google ad, the click ID is stored in a first-party cookie such as _gcl_aw. If they convert within the window, the Google tag reads it and reports the sale back to the right ad. The default window is 90 days.

How cookies remember shopping cart items

A session or persistent cookie holds a cart ID. The shop looks up that ID on each page, so the basket survives page changes and return visits. The same ID can later power an abandoned cart reminder.

Contextual advertising vs cookie-based targeting

Cookie-based targeting follows a person across sites. Contextual advertising matches the ad to the page being read, such as running shoe ads on a marathon article. Contextual needs no ID, so it keeps working when cookies are blocked, but it cannot follow one buyer.

B2B lead generation and IP-to-company cookie matching

B2B tools match a visitor IP address to a company, then add a cookie so a return visit links to the same account. It lets sales see which accounts are researching. It works at company level only, and VPNs and remote work weaken it.

Why cookie tracking is less accurate than it looks

A cookie follows a browser, not a person. That gap explains most “why don’t my numbers match?” questions.

Where cookie data goes wrong, and what it does to your reports
What happensEffect on your data
Visitor clears or blocks cookiesThe same person is counted as a new visitor, which inflates new-user counts
Visitor rejects marketing cookiesNo ID is stored, so ads and conversions go unmeasured. The higher your consent rejection rate, the bigger the blind spot
Ad blockers or browser tracking protectionTags are blocked or cookies shortened, so conversions are under-reported
Phone click, laptop purchaseCookies do not travel between devices, so the journey breaks in two
Shared family deviceOne cookie represents several people, which blurs audiences
Short cookie lifespan (Safari)Long sales cycles lose the original ad click
What to do about it

Treat cookie-based numbers as a floor, not a total. Compare trends over time, check Safari and Chrome separately, and use server-side events and modeled data to fill the gaps. Never judge a channel on last-click cookie reports alone. UTM parameters and click IDs travel in the link itself, so they still show where a visit came from when a cookie is blocked, but they only describe the first click. Our guide to UTM parameters and social media tracking in GA4 shows how to name and tag links so that source data stays clean.

Why cookie tracking is inaccurate: the main causes

Cross-device tracking limitations of cookies

A cookie belongs to one browser on one device. A person who clicks on a phone and buys on a laptop looks like two people. Only a login or another stable ID can join them.

Cookie deletion rates and impact on analytics

People clear cookies, use private windows and switch browsers. Each time, the same visitor becomes a new user, which inflates user counts and cuts repeat-visit numbers. Safari also deletes script-written cookies after 7 days without a visit, so long journeys lose their history.

Ad blockers and tracking cookie prevention

Ad blockers and privacy tools block tracking scripts and cookie requests before they fire. The visit then never reaches your reports. The share blocked varies by audience, and it is usually higher among technical users.

Cookie consent rejection rates impact on marketing data

Every visitor who rejects marketing cookies disappears from ad and conversion reports. A high rejection rate means a larger blind spot, and it is not random, so the people you can see may not match the people you cannot. Track your rejection rate and treat reports as a sample.

How browsers treat tracking cookies in 2026

Browser rules decide which of your cookies survive. The picture changed a lot in 2025, so older guides are out of date.

Chrome

Allowed by default
Third-party cookies
Allowed by default. Users can block them in settings, and Incognito blocks them. Google dropped its plan to remove them in 2025.
First-party cookies
No special limits.
For marketers
Cross-site retargeting still works for consenting users, but the share of blocked traffic keeps growing.

Safari

Blocked by default
Third-party cookies
Blocked by default since 2020, under Intelligent Tracking Prevention (ITP).
First-party cookies
Script-written cookies and other script-written storage are deleted after 7 days of Safari use without a visit to the site. Cookies set through disguised third-party domains are capped at 7 days.
For marketers
Returning visitors and long ad-click windows are hit hardest.

Firefox

Blocked or isolated
Third-party cookies
Enhanced Tracking Protection (ETP) blocks cross-site tracking cookies. Other third-party cookies are kept in a separate jar for each site.
First-party cookies
No special limits.
For marketers
Cross-site audience matching mostly fails.

Google’s Privacy Sandbox, the project meant to replace third-party cookies in Chrome, was retired in October 2025. Topics, Attribution Reporting and Protected Audience are no longer a path to plan around. If an older guide tells you to build on them, skip that advice.

This is the picture as of November 2026. Chrome’s settings could change again, so re-check before big decisions.

Safari ITP and Firefox ETP impact on marketing cookies

Safari’s Intelligent Tracking Prevention (ITP) blocks third-party cookies and caps script-written first-party cookies at 7 days of use. Firefox’s Enhanced Tracking Protection (ETP) blocks known trackers and isolates other third-party cookies per site. For marketers, retargeting audiences shrink and conversion windows look shorter in both browsers. Compare conversion rates by browser to see how large your gap is.

Chrome third-party cookie updates for marketers

On 22 April 2025 Google chose to keep third-party cookies in Chrome as a default, with no separate prompt. The practical update for marketers: Chrome retargeting still works, but Chrome Incognito blocks it, and Chrome users can switch cookies off at any time. Treat Chrome as stable but not guaranteed.

Privacy Sandbox and tracking alternatives

The Privacy Sandbox was Google’s plan to replace third-party cookies with browser-based APIs for interest and measurement. Google retired most of those APIs on 17 October 2025. The tracking alternatives that remain in practice are first-party data, server-side measurement, consent-based modeling and contextual ads, covered below.

How to check, block and clear tracking cookies

Check what cookies a website uses: audit your own in Chrome

  1. Open DevTools on a clean session

    Open a private window, visit your site, and do not click the banner. Right-click the page, choose Inspect and open the Application tab. Under Storage, open Cookies and pick your domain.

  2. Read the cookie table

    For each cookie note the name, domain, expiry, Secure, HttpOnly and SameSite values. Ask who set it and why it exists. Anything you cannot explain is a question for your developer or tag manager. This is also the quickest way to debug a marketing cookie that is not saving.

  3. Check what loads before consent

    Open the Network tab, reload and look for requests to ad and analytics domains. If marketing tags fire before anyone clicks Accept, your banner is not doing its job in regions that require opt-in. Our pillar guide walks through a longer network-tab consent test.

  4. Test tags in Google Tag Manager

    Use Preview mode. Confirm that marketing tags are blocked until consent and that they fire once it is given. Test both Accept and Reject.

  5. Sort cookies into banner categories

    Run a cookie audit tool, such as the scanner built into most consent platforms, then label each cookie essential, functional, analytics or marketing. Review it whenever a plugin or tag is added.

Allow, block or clear cookies as a user

Where to find the cookie settings (menu names can vary by version)
BrowserBlock or disable third-party cookiesAllow, enable or unblock them
ChromeSettings, Privacy and security, Third-party cookies, then choose to block themSame page: choose to allow them, or add one site to the allowed list
SafariOn by default. Settings, Privacy, Prevent cross-site trackingTurn that option off only for a site that breaks, and turn it back on after
FirefoxSettings, Privacy and Security, Enhanced Tracking Protection, Strict or CustomChoose Custom and relax the cookie setting, or turn protection off for one site

To unblock third-party cookies for one site, add it to the allowed list instead of changing the global setting. Checking that third-party cookies are enabled uses the same page.

To clear cookies in Chrome, open the browser menu, choose Delete browsing data and tick Cookies and other site data. Safari and Firefox keep the same option in their privacy settings.

Should you block them? For most people, yes: block third-party cookies by default and allow a site only if something breaks, such as a login through another provider or an embedded payment form. Blocking them hides you from cross-site ad tracking but does not stop a site from recognizing you with its own first-party cookies.

Debugging marketing cookies in browser developer tools

If a marketing cookie is missing, open DevTools, go to Application, then Cookies, and check the domain, expiry, Secure and SameSite values. Switch to the Network tab and look for a blocked or failed request from the tag. Common causes are consent not granted, a wrong SameSite value, an ad blocker, or the tag firing before the page sets the cookie.

Website cookie audit tools for marketers

Besides DevTools, marketers use cookie scanners built into consent platforms, browser extensions that list cookies per site, and Google Tag Manager Preview mode. A scanner finds cookies from a full site crawl and can label them. Run one after any new plugin or campaign tag goes live.

How to categorize cookies for a cookie banner

Sort every cookie by purpose, not by who set it. Strictly necessary cookies keep the site working. Preference cookies remember choices, analytics cookies measure use, and marketing cookies serve ads or track conversions. When a cookie has two purposes, file it under the least private one, and update the list whenever the scan changes.

What replaces third-party cookies

Chrome kept third-party cookies, but many of your visitors already use a browser that blocks or limits them. Marketers talk about a cookieless future, though it is closer to a cookie-limited one. The impact of third-party cookie deprecation is uneven. Safari and Firefox users are already hard to retarget across sites, Chrome users still can be, and publishers feel the squeeze most, because advertisers pay less for audiences they cannot recognize. A first-party data strategy is the base of any plan.

Alternatives to third-party cookies
OptionWhat it isBest forWatch out for
First-party data and cookiesData customers give you directly, tied to your own domain. This includes zero-party data, which people share on purpose, such as preferencesEmail, CRM audiences, personalizationYou still need consent and a clear reason to collect
Server-side taggingEvents sent from your server to ad platforms, not only from the browser. Server-side Google Tag Manager runs your tags on a server you control instead of in the visitor’s browserMore reliable conversion data, longer first-party cookiesBrowsers still apply their own limits; test in Safari
Platform server APIsMeta’s Conversions API and Google’s enhanced conversionsRecovering conversions the browser missesNeeds consent, and duplicate events must be removed
Contextual advertisingTargets the page content, not the personAwareness without personal dataLess precise for retargeting
Identity IDs such as UID2An ID built from a hashed email, shared with partnersPublishers and advertisers with logged-in usersRelies on people sharing an email and agreeing to it
Data clean roomsA shared space where two companies match data without exposing itLarge advertisers and retailersCostly and technical
Modeled and aggregate measurementStatistical estimates. Probabilistic methods infer a match from signals such as device and timing, while deterministic methods match a known login or emailFilling gaps in reportsEstimates, not exact counts

Alternatives to third-party cookies in advertising

The cookieless future in digital marketing does not mean tracking ends. It means a mix of methods that work with consent and your own data. Here is how the main alternatives compare.

First-party data strategy in a cookieless world

Collect emails, purchases and preferences directly, with permission, and use them to build audiences and measure results. It is the most durable base because you own it. Our guide on how to use first-party data in marketing covers what to collect, where to store it and how to put it to work. To see how anonymous traffic can become known contacts, read how to identify anonymous website visitors.

Data clean rooms and cookie alternatives

A data clean room lets two companies, such as a brand and a publisher, match customer lists in a protected space. Neither side sees the raw data of the other, only combined results.

Probabilistic vs deterministic tracking without cookies

Deterministic matching uses a known login or email, so it is accurate but limited to signed-in users. Probabilistic matching infers a match from signals like device and timing, so it reaches more people but is less certain.

Device fingerprinting vs tracking cookies

Fingerprinting builds an ID from device and browser traits, with nothing stored. It survives cookie deletion, but browsers are limiting it and privacy rules treat it like cookies, so consent still applies.

Server-side Google Tag Manager vs client-side cookies

With client-side tagging, tags run in the visitor’s browser and set their own cookies. With server-side Google Tag Manager, the browser sends data to a server you control, which forwards it to ad platforms. You get fewer scripts on the page and more control over what is shared. It does not remove the need for consent.

Server-side tagging and first-party cookie lifespan

A cookie set by your own server on your own domain can last longer than one written by a script in Safari. Safari may still cap it if the server address does not match your site. Treat server-side tagging as a way to improve lifespan and accuracy, not as a guarantee.

How to migrate from third-party to first-party cookies in five steps

  1. Audit what you collect

    Use the Chrome audit above and list every tag and cookie, with an owner for each.

  2. Cut what you do not use

    Remove old pixels and tags from past campaigns. Fewer cookies means fewer consent and security problems.

  3. Move key events to your own domain

    Set up the Google Conversion Linker, server-side tagging and the platform APIs for your main conversions. Our social media tracking guide explains how to pair the Meta Pixel with the Conversions API and deduplicate events with a shared event ID.

  4. Connect consent to every tag

    Tie each tag to a banner category and test Accept, Reject and no choice.

  5. Compare browsers and fix the gap

    Report conversions per browser. If Safari lags far behind Chrome, start there. Then put the data you collect directly to work, as described in our first-party data guide.

Go deeper

Ad tech terms in plain words

Cookie articles lean on jargon. Here is the short list you will meet most.

Ad server

Software that stores ads, decides which one each visitor sees, and counts impressions and clicks.

Ad exchange

A marketplace where publishers sell ad space and advertisers bid for it.

DSP (demand-side platform)

The tool advertisers use to buy ad space across many exchanges.

DMP (data management platform)

A system that stores audience segments built from cookie IDs and other data, for use in ad buying.

CDP (customer data platform)

A system that combines your own customer data from many sources into one profile per person.

CMP (consent management platform)

The tool that shows your banner, records each choice and tells tags what they may do.

Programmatic advertising

Buying and placing ads automatically by software, usually through real-time bidding.

Tracking pixel

A tiny invisible image or script that tells a server a page or email was viewed. It often reads or sets a cookie.

User ID and HTTP cookie

A user ID is a code standing for one browser or person. An HTTP cookie is the technical name for the browser cookies in this guide.

Browser cache

A store of page files, such as images and scripts, kept to load sites faster. It is separate from cookies.

PII

Personally identifiable information: data that can identify a person, such as a name, email or phone number.

UTM parameters

Tags added to a link, such as utm_source, that tell analytics where a click came from. See our UTM naming convention guide for a template.

Six common cookie mistakes marketers make

1

Treating the banner as the whole job

A banner is a form. Compliance means the tags behind it actually wait for consent.

2

Firing tags before consent

The most common audit failure. Test with a clean private window.

3

Trusting last-click reports

Cookies miss cross-device and blocked traffic. Check results against sales and lift tests.

4

Building on third-party cookies

Safari and Firefox already break that chain. Keep core measurement on your own domain and grow your own first-party data.

5

Labeling cookies wrongly

Filing an advertising cookie as “essential” is a legal risk and invites regulator attention.

6

Never re-auditing

Plugins, themes and new tools add cookies quietly. Scan quarterly.

Conclusion

Tracking cookies are simple in design and messy in practice. One ID can power retargeting, conversion tracking and attribution, yet browsers, laws and users now limit what it can see. Marketers who understand the chain can keep what works, drop what does not and explain it to customers in plain words.

Start with your own site: list the cookies, make sure marketing tags wait for consent and move your key measurement onto your own domain. Then build on the data customers choose to share with you, which is the focus of our guide to using first-party data in marketing.

Three things to do this week

1. Open DevTools on a private window and list every cookie your site sets before anyone clicks the banner.

2. Confirm marketing tags only fire after consent, and test both Accept and Reject in Tag Manager.

3. Compare conversions in Safari and Chrome. If Safari is far lower, plan server-side events for your top conversion.

Continue the series

Next, learn how to collect and use data you own in How to Use First-Party Data in Marketing. To see how tracking cookies fit into retargeting and consent, read the main guide to tracking users across the web. More guides in the series are coming soon.

Frequently asked questions

What are tracking cookies?

Small text files stored in your browser that carry a unique ID. Websites and ad companies read the ID to recognize your browser later, count visits, measure ads and show targeted ads. A cookie is a tracking cookie when it is used to follow behavior over time or across sites.

What is the difference between tracking cookies and marketing cookies?

Tracking describes what the cookie does: follow a browser with an ID. Marketing describes why: ads, retargeting and conversion measurement. Marketing cookies are usually a banner category, and most of them are tracking cookies.

Why do websites use cookies?

For three main reasons: to make a site work, such as login and cart; to measure how it is used, through analytics; and to support marketing, such as ads and conversion tracking. Only the first group is usually exempt from consent in the EU.

What happens when you accept marketing cookies?

The site lets ad and analytics tags store IDs and record your activity. Ad platforms can then link your visits to a profile, measure conversions and show you retargeting ads. You can change your choice later through the banner settings or by clearing cookies.

What happens if I reject marketing cookies?

The site should not load its marketing tags or store their IDs. You still see ads, but they are less tied to your browsing. The site still works, though the business may lose some measurement and you may get more generic ads.

Should I block third-party cookies?

For most people, yes. Blocking them stops cross-site ad tracking and breaks little. Allow them for one site only if something stops working, such as a login through another service or an embedded payment form. Safari and Firefox already restrict them by default.

How long do marketing cookies last?

It varies by platform. Google Ads click cookies and Meta’s main cookies state 90 days. Google Analytics’ main cookie defaults to two years. Safari can delete cookies written by scripts after seven days of browser use without a visit to the site.

Are tracking cookies legal?

Yes, with conditions. In the EU you need consent before non-essential cookies. In California you must let people opt out of sale or sharing and honor the Global Privacy Control. India’s data protection law adds consent duties from about May 2027. Check the rules where your audience lives.

Are marketing cookies dangerous or safe?

The files themselves are safe: they cannot run code or read your device. The concern is privacy, because the IDs let companies build profiles. Stolen login cookies are a separate security risk. Use browser protections and decline marketing cookies if you prefer less tracking.

Can tracking cookies steal personal information?

Not by themselves. A tracking cookie stores an ID, not your files or passwords. But it can connect your browsing to a profile that includes details you gave a site, like an email address. That is why regulators treat tracking cookies as personal data in many cases.

Why do I see ads for things I just searched for?

An ad platform saw your visit through a cookie or similar ID and added you to a retargeting audience. When you load another site that sells ad space, the platform recognizes your browser and bids to show the product you viewed.

Do I need consent for marketing cookies?

In the EU and EEA, yes, before they are set, even if the ID holds no personal data. In the US the model is mostly opt-out, with rules that vary by state. Under India’s DPDP Act, treat consent as the safe default whenever data can identify a person.

What replaces third-party cookies?

No single replacement. Marketers combine first-party data, server-side tagging, platform APIs like Meta’s Conversions API, contextual advertising, hashed-email IDs and modeled measurement. Chrome still allows third-party cookies, but Safari and Firefox do not, so most teams plan for both worlds.

Sources and further reading

Portrait of Aditya Choudhury

Aditya Choudhury

SEO Team Lead and Digital Marketing Specialist

Aditya leads the SEO team at Oddtusk, specializing in semantic SEO, content strategy, topical authority and AI search visibility. His work spans technical SEO audits, entity-based content frameworks and scalable organic growth strategies for clients across the US, India and the UK.

Related articles