AnyLearn
All lessons
Businessintermediate

Inside the ad machine: how an ad finds you

In the moment a page loads, a request describing you is auctioned to thousands of potential buyers and the winner's ad is delivered, all before you see anything. Learn the supply chain behind that: the buy side and sell side, real-time bidding, how you become a targetable audience, and how much of an advertiser's money is eaten on the way through.

Updated · AI-authored, review-gated · how lessons are made

Not signed in: your progress and quiz score won't be saved.
Progress1 / 8

One ad, a whole supply chain

The auction from the previous lesson does not happen in one place. On the open web it is the last step of a supply chain with several companies between the advertiser's money and the publisher's page, each running software, each taking a cut.

The cast, in plain terms:

  • Advertiser wants to reach people.
  • Demand-side platform (DSP) is the software the advertiser uses to buy, bidding on their behalf across many sources.
  • Ad exchange is the marketplace where the auction actually runs.
  • Supply-side platform (SSP) is the software a publisher uses to sell its slots into that marketplace.
  • Publisher owns the page and the audience.

So money flows advertiser to DSP to exchange to SSP to publisher, and an ad flows back the other way. Walled gardens like the big social platforms collapse this chain inside one company, but the open web is this relay, and its length is the reason it behaves the way it does.

Full lesson text

All 8 steps on one page, for reading, reference, and search.

Show

1. One ad, a whole supply chain

The auction from the previous lesson does not happen in one place. On the open web it is the last step of a supply chain with several companies between the advertiser's money and the publisher's page, each running software, each taking a cut.

The cast, in plain terms:

  • Advertiser wants to reach people.
  • Demand-side platform (DSP) is the software the advertiser uses to buy, bidding on their behalf across many sources.
  • Ad exchange is the marketplace where the auction actually runs.
  • Supply-side platform (SSP) is the software a publisher uses to sell its slots into that marketplace.
  • Publisher owns the page and the audience.

So money flows advertiser to DSP to exchange to SSP to publisher, and an ad flows back the other way. Walled gardens like the big social platforms collapse this chain inside one company, but the open web is this relay, and its length is the reason it behaves the way it does.

2. Real-time bidding, step by step

The mechanism that runs the open web is real-time bidding, RTB: a fresh auction for a single impression, triggered the instant a page begins to load.

The sequence, all inside roughly 100 milliseconds:

  1. You open a page. The publisher's SSP creates a bid request describing the opportunity: the site, the ad size, rough location, device, and whatever identifiers exist for the user.
  2. The exchange broadcasts that request to many DSPs at once.
  3. Each DSP decides, in a few milliseconds, whether this impression matches a campaign and what it is worth, and returns a bid.
  4. The auction picks a winner.
  5. The winning ad is fetched and rendered, all before the page finishes painting.

The thing to hold onto: the product being auctioned is a description of you, assembled and sold in the time it takes a page to appear. The advertiser is not buying a slot on a site so much as buying this impression, for this user, right now.

3. Why publishers auction to everyone at once

Publishers used to sell leftover inventory in a waterfall: offer it to the best-paying partner first, and if they declined, cascade down to the next, and the next. Each step added delay, and the order was based on historical averages, so a buyer who would have paid more further down the chain never got the chance.

The fix, header bidding, flips it: the publisher asks many demand sources to bid simultaneously, before the page even calls its own ad server, then sends the highest real bid to compete. Parallel instead of sequential.

waterfallheader bidding
orderranked by past averageall bid at once
price discoverypoor, misses high bidsevery impression fully contested
latencyadds up down the chainone parallel round
who benefitsintermediaries near the topthe publisher

The general pattern is worth naming: a sequential process ranked by averages leaves money on the table, and forcing everything to compete at once recovers it. It is the same insight as ranking ads by expected value rather than serving them in a fixed order.

4. How you become an audience

A bid is only worth making if the DSP knows who it is bidding on. Targeting is how a person becomes a set of attributes an advertiser can buy. There are three broad kinds, and they differ sharply in how much they need to know about you.

  • Contextual. Target the page, not the person: show running shoes next to a marathon article. Needs nothing about the user. Old, and quietly resurgent because it survives privacy changes.
  • Behavioural. Target the person based on past activity: sites visited, things searched, videos watched, assembled into interest segments.
  • Audience-based. Target a list: your own customers uploaded and matched, or a lookalike audience the platform builds by finding users statistically similar to your best customers.

Lookalikes are where machine learning enters advertising directly. You supply examples of people who converted; the platform finds more of them. It is the recommender problem from the algorithms path, pointed at ads: given these positive examples, retrieve similar users.

5. The identifier problem

Behavioural and audience targeting both need one hard thing: recognising that the person on this page is the same person seen elsewhere. That recognition runs on identifiers.

  • A third-party cookie was the classic web identifier: a tag one company could read across many different sites, which is exactly what let an advertiser follow you around the web.
  • A mobile advertising ID did the same job inside phone apps.
  • First-party data is what a site knows about you from your own activity on it, a login, a purchase, and it does not depend on cross-site tracking at all.

The entire behavioural-targeting apparatus rests on cross-site and cross-app identifiers being available and stable. They are now neither, by deliberate design of browsers and phone platforms, which is the subject of the next lesson.

Hold the distinction clearly, because it decides everything downstream: first-party identity is something you have a direct relationship for; third-party identity is something inferred by watching you across places you never connected. The second is the one going away.

6. The tax on the chain

Every company in the relay takes a fee, and because there are several, the total is large and was for years hard to see. Advertisers could not account for where a meaningful share of their money went.

The most-cited measurement is the ISBA/PwC Programmatic Supply Chain Transparency Study. Its 2020 report found that only about 51 percent of advertiser spend reached publishers, with roughly 15 percent an unattributable 'unknown delta', money that vanished into the chain and could not be traced at all. The follow-up study reported in January 2023 found improvement: publishers' share up to about 57 percent and the unknown delta down to around 3 percent.

Read those numbers as a health check on a supply chain, not a scandal. Roughly two-fifths of spend going to intermediation is what a long automated relay costs, and a large untraceable slice is what happens when many parties hold different fragments of the record.

The structural lesson: the more hops between payer and payee, the more that leaks and the harder it is to audit. It is exactly why advertisers push toward shorter paths, direct deals, and walled gardens where the chain is one company.

7. Walled gardens versus the open web

That fee structure explains the biggest split in the industry. A walled garden, a large social or search platform, owns the whole chain: it is the exchange, the buying tool, the audience data, and the inventory, all in one company.

open webwalled garden
the chainmany firms, many feesone company end to end
identityleaned on third-party cookieslogged-in, first-party
measurementfragmented across partiesthe platform reports on itself
advertiser controlhigh, and complexlow, and simple
transparencypoor historically, improvingthe platform marks its own homework

The trade is stark. The open web offers control, competition and portability, at the cost of complexity and leakage. The walled garden offers simplicity, durable logged-in identity, and strong performance, at the cost of independent verification, you largely trust the platform's own numbers, on inventory it also sells.

As third-party identifiers disappear, the walled gardens' logged-in identity becomes even more valuable, which is why privacy changes, meant to protect users, have also tended to concentrate advertising inside the largest platforms.

8. The path of one impression

A page load becomes a bid request describing the user, broadcast to many buyers, auctioned, and answered with an ad, with fees taken at each hop on the open web.

flowchart LR
  A["you open a page"] --> B["publisher SSP builds a bid request"]
  B --> C["exchange broadcasts it to many DSPs"]
  C --> D["each DSP values the impression and bids"]
  D --> E["auction picks the winner"]
  E --> F["winning ad rendered before the page paints"]
  C --> G["fees taken at each hop: about half reaches the publisher"]

Check your understanding

The lesson ends with a 5-question quiz. Take it in the player above to see your score.

  1. In the open-web ad supply chain, what does a DSP (demand-side platform) do?
    • It is the software advertisers use to bid on impressions across many sources
    • It is the marketplace where the auction runs
    • It is the software publishers use to sell their slots
    • It is the publisher's own ad server
  2. In real-time bidding, what is actually being auctioned?
    • A fixed weekly slot on the website
    • A single impression described by the user's context and identifiers, decided in about 100ms
    • The publisher's entire ad inventory at once
    • The advertiser's whole campaign budget
  3. Why did header bidding replace the older waterfall model for publishers?
    • It removed the need for an ad exchange
    • It let publishers set fixed prices instead of auctioning
    • The waterfall offered inventory in a sequence ranked by past averages, so header bidding's parallel auction captures higher bids it would have missed
    • It eliminated all latency
  4. Which targeting method needs to know nothing about the individual user?
    • Behavioural targeting
    • Lookalike audiences
    • Customer-list targeting
    • Contextual targeting
  5. The ISBA/PwC studies found roughly what share of advertiser spend reaching publishers, and what was the 'unknown delta' in 2020?
    • About 90% reached publishers, with a 1% delta
    • About half reached publishers, with roughly 15% untraceable in 2020 (improving to ~57% and ~3% by the 2023 study)
    • Nearly all spend reached publishers with no delta
    • About 10% reached publishers, with 50% untraceable

Related lessons

Business
intermediate

The ad auction: how your attention is priced

Nobody sets the price of an ad slot by hand. An auction does it, billions of times a day, in the time it takes a page to load. Learn why advertising runs on auctions, how the second-price idea makes bidding honest, why the highest bid often loses to a better ad, and why the industry quietly switched from second-price to first-price auctions.

8 steps·~12 min
Business
intermediate

What AI Actually Does Across the Funnel

Marketing adopted AI faster than almost any function and has the least reliable evidence about whether it helped. This lesson maps the capability honestly across the funnel, separates the uses where output volume is the point from those where quality is, and explains why marketing's measurement problem makes the question unusually hard to answer.

8 steps·~12 min
Business
beginner

The seven ways creators get paid

A creator with a million followers can earn a fortune or almost nothing, depending entirely on how the audience is monetized. Learn the seven distinct income models, from ad revenue share to sponsorships to memberships, who carries the risk in each, which ones depend on a platform's goodwill, and why the mix a creator chooses matters more than the size of their audience.

8 steps·~12 min
Business
intermediate

Did the ad even work? The attribution problem

Half the money spent on advertising is wasted; the trouble is knowing which half. Learn why measuring whether an ad caused a sale is genuinely hard, why last-click attribution flatters the wrong channels, how privacy changes broke the tracking that measurement relied on, and the three-part toolkit that replaced it: incrementality, media-mix modeling, and privacy-preserving reporting.

8 steps·~12 min