Sub topic 1
How third-party cookies power targeting and measurement
Prerequisites
This chapter assumes you know basic digital marketing terms (campaigns, conversions, funnels). It also assumes you have used a tag manager and know that a cookie is a small piece of data a browser stores for a website.
First-party versus third-party
A cookie's type depends on which site is in the address bar when the browser sends it.
- A first-party cookie belongs to the site the visitor is on. If
shop.examplesets it, onlyshop.examplereceives it. - A third-party cookie belongs to a different domain that is embedded in the page, such as an ad server, a tracking pixel or a social widget. The browser sends it every time any page loads a resource from that domain.
The second case is what made cross-site tracking possible. A third-party cookie is not a different technology. The same cookie is simply sent from many unrelated sites.
An ad server might set a cookie like this:
Set-Cookie: uid=a81f3c; Max-Age=7776000; Path=/; Domain=adserver.example; Secure; SameSite=NoneSameSite=None with Secure is what allows the browser to send the cookie in cross-site requests. A cookie marked SameSite=Lax is not sent with most cross-site subrequests, so it works only as first-party.
How the tracking loop works
The ad server never needs to know who the person is. A stable random ID is enough to link a publisher visit to an advertiser visit and build a profile over time.
What marketers used the cookie ID for
| Use | How the cookie ID helps |
|---|---|
| Interest and audience targeting | Pages visited across many sites are combined into segments such as "in-market for running shoes". |
| Retargeting | A tag on a product page adds the ID to a list. Later, ads are shown to that ID on other sites. |
| Frequency capping | The ad server counts impressions per ID and stops at a limit across all publishers. |
| Click-through and view-through attribution | A conversion pixel reads the ID and matches it to earlier ad clicks or impressions. |
| Reach and overlap reporting | Deduplicating IDs across channels estimates how many distinct people were reached. |
| Audience syncing | Platforms exchange mappings between their own IDs, so one person can be recognized in several systems. |
Why this matters for measurement
Attribution is built on joining two events: an ad exposure and a later conversion. The cookie ID is the join key. If it is missing, blocked or expires, the join fails. The conversion is then reported as direct or unattributed, or not reported at all.
Compare this with campaign tags. A UTM link records the source of a single visit without any cross-site ID:
https://example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_saleUTM parameters are first-party. They tell you where a visit came from, but they cannot link separate visits or sites to one person. That limit is the difference between campaign tagging and third-party cookie tracking.
Common mistakes
- Treating all cookies as one thing. Restrictions apply mostly to third-party cookies and to some script-set first-party cookies.
- Assuming the cookie identifies a person. It identifies a browser on one device. The same person on a phone and a laptop looks like two IDs.
- Ignoring expiry. Cookies are deleted by users and expire, so long attribution windows undercount.
Exercise
A visitor sees your retargeting ad on a news site, then buys on your site the next day. Name the two cookie-based steps that let the ad platform credit the ad, and explain why the match fails if the browser blocks third-party cookies.
Show answer
First, the ad platform's cookie ID is set when the ad is served on the news site, which records the exposure. Second, the conversion tag on your site reads the same ID, so the platform can join the purchase to the exposure. If third-party cookies are blocked, the ad server cannot set or read its ID in those cross-site requests, so the two events carry no shared key. The purchase appears as unattributed or direct.