Home / Tutorials / Adtech Basics
01 / ADTECH BASICS · LESSON 2
How a Programmatic Ad Gets Served, Step by Step
In the last article you saw the players. Now let's follow one ad impression from start to finish. Understanding this flow is the single most useful thing in adtech: almost every job, tool and interview question connects back to it.
The short answer
When a page loads, the publisher asks "who wants to show an ad here?", buyers bid in an auction, the winner's ad is shown, and tracking confirms it happened. The whole round trip usually finishes in a few hundred milliseconds.
The full flow, step by step
1. The page loads and asks for an ad
The page contains ad tags: small pieces of code that mark where ads go. On many sites this is Google Publisher Tag (GPT). When the page loads, the tag sends an ad request to the publisher's ad server with details such as the ad unit, size (for example 300×250) and page URL.
2. The publisher ad server looks at its options
The ad server (for example Google Ad Manager) checks what could fill the slot:
- Direct deals the publisher sold in advance (a brand booked 1 lakh impressions on the homepage)
- Programmatic demand from SSPs and exchanges
- House ads if nothing else is available
If programmatic demand is allowed to compete, the ad server or the page calls one or more SSPs.
3. The SSP sends bid requests
The SSP packages the impression into a bid request, usually in the OpenRTB format. It contains things like:
- Ad size and position
- Site or app name and page URL
- Device type, operating system, rough location
- A user identifier, if one is available and consent allows it
- The floor price: the minimum the publisher will accept
This request goes out to many DSPs at the same time.
4. DSPs decide and bid
Each DSP has a strict time limit, often around 100 milliseconds. In that time it checks:
- Does this impression match any active campaign's targeting?
- What is this impression worth to that advertiser?
- Is there budget left today?
If yes, it returns a bid: a price (usually expressed as CPM, the price per 1,000 impressions) plus the ad to show. If not, it returns "no bid".
5. The auction picks a winner
The exchange compares all valid bids above the floor and picks the highest. Most exchanges today run first-price auctions, where the winner pays what it bid. You will learn the details in Course 02.
6 and 7. The winning ad goes back to the page
The winning price goes back to the publisher ad server, which compares it to its other options (like direct deals). If programmatic wins, the creative (the ad itself: image, HTML or video) is sent to the browser.
8. The ad renders
The browser displays the ad inside the slot, usually inside an iframe so it can't break the rest of the page.
9. Tracking fires
Several small requests (pixels) are sent to confirm the impression:
- The ad server counts it for reporting
- The DSP and SSP record the win for billing
- Verification vendors may measure viewability (was it actually on screen?)
If the user clicks, a click tracker records that too and then redirects to the advertiser's site.
Where header bidding fits
On many publisher sites, steps 2 and 3 are changed by header bidding: the page asks several SSPs for bids before calling the ad server, then passes the best bids into the ad server so they compete fairly with direct deals. This gets publishers higher prices. Course 03 covers it in detail.
Why speed matters
Every millisecond counts:
- Slow auctions delay the page, which hurts the user experience and SEO.
- If a DSP replies after the timeout, its bid is ignored, even if it was the highest.
- Users scroll fast; an ad that loads late may never be seen, which lowers viewability.
Key takeaways
- An impression goes: ad request → bid requests → bids → auction → creative → render → tracking.
- The publisher ad server decides between direct deals and programmatic demand.
- DSPs have around 100 ms to decide and bid.
- Tracking pixels are how everyone agrees an impression happened, which is what billing is based on.
Interview questions
- Walk me through what happens when an ad loads on a web page. Use the nine steps above, and mention timeouts and tracking.
- What is a floor price? The minimum price a publisher will accept for an impression. Bids below it are rejected.
- Why are ads usually rendered inside iframes? To isolate ad code from the publisher's page for security and stability.
- What happens if a DSP replies after the timeout? Its bid is ignored, even if it would have won.