How Programmatic Advertising Works: The Complete Guide for Publishers and Advertisers
Programmatic advertising is the automated buying and selling of ad inventory through real-time auctions. This guide maps the entire system for you, from bid request to rendered ad, covering every platform, protocol, and deal type involved. Whether you buy media or sell it, this is the landscape you operate in.
What Is Programmatic Advertising?
Programmatic advertising replaces manual insertion orders and sales calls with software that matches ad inventory to advertisers in milliseconds. You set targeting parameters and budgets. Algorithms handle the rest.
The system involves five core components: demand-side platforms (DSPs) where advertisers bid, supply-side platforms (SSPs) where publishers list inventory, ad exchanges that host the auction, ad servers that deliver the winning creative, and protocols like OpenRTB that standardize the data format flowing between all of them.
In 2025, programmatic accounted for over 90% of all digital display ad spending in the US according to eMarketer. Direct-sold campaigns still exist, but they’re the exception. If you’re running display, video, or connected TV ads, you’re running programmatic whether you think about it that way or not.
The CPM pricing model is the default billing method across programmatic channels. Every auction, every bid, every clearing price is expressed as a CPM rate. Understanding how programmatic works means understanding what drives the CPM you pay or earn.
How Does a Programmatic Auction Work in Real Time?
A user loads a web page. The publisher’s ad server fires an ad request. Within 100 to 200 milliseconds, dozens of DSPs receive a bid request, evaluate it against active campaigns, submit a bid or pass, and a winner is selected. The winning creative renders before the page finishes loading.
That entire cycle, from page load to rendered ad, happens faster than a human blink. The speed is the point. Manual media buying takes days of emails and phone calls to place a single campaign. Programmatic runs thousands of auctions per second, each one matching a specific user on a specific page to the advertiser willing to pay the most for that impression.
The bid request itself contains data about the user (anonymized identifiers, location, device type), the page (URL, content category, ad slot dimensions), and the publisher’s floor price. DSPs evaluate this data against advertiser targeting criteria and decide whether to bid, and how much.
Real-time bidding (RTB) is the protocol that makes this possible. We cover the full auction sequence, bid request contents, latency constraints, and pricing mechanics in our complete RTB guide.
What Are DSPs, SSPs, and Ad Exchanges?
Three platforms form the structural core of programmatic. Each serves a different party in the transaction, but they only function as a system.
What Does a Demand-Side Platform (DSP) Do?
A DSP is where advertisers and agencies manage programmatic campaigns. You set your audience targeting, upload creative, define budgets and bid strategies, and the DSP executes millions of bid decisions per second on your behalf.
The major DSPs include The Trade Desk (the largest independent), DV360 (Google’s buy-side platform), Amazon DSP, and Xandr (Microsoft). Each connects to hundreds of SSPs and exchanges, giving you access to inventory across the open web, mobile apps, CTV, and audio.
DSPs charge a technology fee, typically 10 to 15% of media spend, on top of the CPM you pay for impressions. That fee is often invisible in reporting unless you ask for it.
What Does a Supply-Side Platform (SSP) Do?
An SSP is the publisher’s counterpart to the DSP. It manages your ad inventory, connects you to multiple demand sources, and runs yield optimization to maximize your revenue per impression.
Major SSPs include Magnite (formerly Rubicon Project), PubMatic, Index Exchange, and OpenX. Google Ad Manager (GAM) functions as both an ad server and an SSP through its AdX exchange integration.
For publishers, the SSP is where you set floor prices, manage which advertisers can access your inventory, and monitor fill rate and eCPM performance.
The full breakdown of how DSPs and SSPs interact, including who needs which and when a single platform handles both roles, is in our DSP vs SSP guide.
Where Do Ad Exchanges Fit In?
An ad exchange is the marketplace where DSP bids meet SSP inventory. Think of DSPs as buyers and SSPs as sellers. The exchange is the trading floor.
Some exchanges operate independently (OpenX, Index Exchange). Others are embedded within larger platforms. Google AdX is the largest ad exchange globally, integrated directly into Google Ad Manager. The line between SSP and exchange has blurred considerably. Magnite and PubMatic function as both.
Exchanges charge a take rate, typically 10 to 20% of the transaction value. That fee comes out of what the publisher receives, not what the advertiser pays. If an advertiser bids a $10 CPM and the exchange takes 15%, the publisher sees $8.50.
Our ad exchange guide covers how exchanges differ from ad networks, open vs private exchange access, and fee transparency.
What Are the Different Programmatic Deal Types?
Not all programmatic buying happens in open auctions. Four deal types exist, each trading off between price certainty, inventory access, and flexibility. The right choice depends on whether you value guaranteed volume or competitive pricing.
- Pricing
- Auction
- Reserved
- No
- CPM
- Baseline
- Pricing
- Invite-only auction
- Reserved
- No
- CPM
- Above open auction
- Pricing
- Fixed, first right of refusal
- Reserved
- No
- CPM
- Higher, negotiated
- Pricing
- Fixed, no auction
- Reserved
- Yes
- CPM
- Highest, negotiated
Open Auction
Open auction is the default. Any qualified DSP can bid on any available impression. Clearing prices are set by competition. This is the highest-volume, lowest-CPM deal type, and where most programmatic spend flows.
The trade-off: you get scale and efficiency, but no inventory guarantees. Premium publishers often hold their best placements out of open auction entirely, reserving them for direct or PMP deals.
Private Marketplace Deals (PMPs)
PMPs are invitation-only auctions. A publisher opens specific inventory to a curated list of advertisers, typically at higher floor prices than open auction. You get access to premium placements. The publisher gets higher CPMs from qualified buyers.
PMPs run on deal IDs, unique identifiers that DSPs activate to participate. The mechanics of PMP setup, deal ID configuration, and the CPM premium publishers typically capture are covered in our PMP guide.
Programmatic Guaranteed and Preferred Deals
Programmatic guaranteed automates the traditional insertion order. Fixed price, fixed volume, reserved inventory. The publisher commits specific impressions to you at an agreed CPM. No auction. No competition.
Preferred deals are similar but without the reservation. You get a fixed price and first right of refusal on impressions, but if you pass, the impression goes to open auction. It is the middle ground between guaranteed access and auction flexibility.
Both deal types are managed through Google Ad Manager on the publisher side and activated in DSPs on the buy side. Our programmatic guaranteed vs preferred deals comparison breaks down when each makes sense and the revenue implications for publishers.
How Do Programmatic Auctions Set Prices?
Programmatic pricing shifted fundamentally in 2019 when the industry moved from second-price to first-price auctions. That change affected every CPM you pay or earn.
First-Price vs Second-Price: What Changed?
In a second-price auction, the winner paid $0.01 above the second-highest bid. You could bid $10, the next bidder offered $6, and you paid $6.01. Bidding your true value carried no penalty.
First-price auctions changed the math. You pay exactly what you bid. That $10 bid now costs $10, not $6.01. Google AdX completed the switch to first-price in September 2019, and every major exchange followed.
The shift raised effective CPMs for publishers initially and forced advertisers to rethink bidding strategy. You can no longer bid high and rely on the auction to pull your price down. Our first-price vs second-price guide covers the full transition, its impact on clearing prices, and what it means for your bidding approach.
What Is Bid Shading and How Does It Offset First-Price Risk?
Bid shading is the DSP’s answer to first-price overpayment. Instead of submitting your full bid, the DSP’s algorithm analyzes historical auction data for that specific inventory, estimates the minimum bid likely to win, and submits a reduced bid.
The Trade Desk, DV360, and most major DSPs run proprietary bid shading models. Typical savings range from 15 to 30% compared to unshaded first-price bids. The algorithm gets smarter over time as it accumulates more auction data for each publisher, placement, and audience segment.
Bid shading directly affects the CPM you pay as an advertiser and the revenue publishers receive. We break down the mechanics, savings data, and transparency issues in our bid shading guide.
How Does ads.txt Protect Programmatic Revenue?
ads.txt is a text file publishers host at their root domain that lists every exchange and reseller authorized to sell their inventory. DSPs check this file before buying to verify they’re purchasing from a legitimate source.
Without ads.txt, bad actors can spoof your domain, list fake inventory on exchanges, and pocket the ad spend. IAB Tech Lab introduced the standard in 2017 specifically to combat this. By 2026, most DSPs refuse to bid on inventory from publishers missing an ads.txt file. No ads.txt means no programmatic demand.
The file format is simple: one line per authorized seller with the exchange domain, your publisher ID, the relationship type (DIRECT or RESELLER), and an optional certification ID. Getting it wrong, even small errors like a mistyped publisher ID, silently blocks demand sources from bidding on your inventory.
Implementation, the DIRECT vs RESELLER distinction, common mistakes, and the relationship between ads.txt and sellers.json are all in our ads.txt guide.
Where Does Programmatic Connect to Header Bidding?
Header bidding is a technique publishers use to expose their inventory to multiple SSPs and exchanges simultaneously before calling their primary ad server. It replaced the waterfall model, where demand sources were called sequentially, with a unified auction that increases competition and raises CPMs.
Prebid.js is the dominant open-source header bidding wrapper, connecting publishers to 300+ demand partners through a single integration. Server-side alternatives like Amazon TAM and Google Open Bidding reduce latency but introduce cookie-matching limitations.
If you’re a publisher running programmatic, header bidding is how you maximize the CPM you earn from it. The full technical breakdown, from Prebid.js setup to timeout optimization to price floor strategy, is in our header bidding guide.
What Does Programmatic Cost?
Programmatic pricing is expressed in CPM. Rates vary enormously by platform, format, targeting, and deal type. Google Display Network open auction inventory can clear at $2 to $3 CPM. LinkedIn programmatic campaigns run $25 to $45. Connected TV sits at $25 to $40.
Beyond the media CPM, you’re paying technology fees at every layer. DSP fee (10 to 15%), SSP fee (10 to 20%), exchange take rate, verification costs (IAS, DoubleVerify), and potentially an agency commission on top. A $10 CPM media cost often represents $14 to $16 in total cost once all intermediaries take their cut.
Run your CPM math using the CPM calculator. For cross-model comparisons, the CPC calculator and CPM benchmarks page give you reference points across platforms and industries.
Where to Start: Recommended Reading Order
Your next article depends on which side of the transaction you sit on.
If you’re an advertiser or agency buyer:
- What Is Real-Time Bidding (RTB)?: understand the auction you’re bidding in
- DSP vs SSP: know the platforms and who they serve
- First-Price vs Second-Price Auctions: understand the pricing mechanic that determines your CPM
- Bid Shading: learn the optimization that reduces your overpayment risk
- Private Marketplace Deals: access premium inventory beyond open auction
If you’re a publisher:
- Ad Exchanges: understand where your inventory is sold
- ads.txt: protect your revenue from spoofing (do this first if you haven’t already)
- Programmatic Guaranteed vs Preferred Deals: sell premium inventory at fixed rates
- Header Bidding: maximize competition for your impressions
- Our full publisher monetization guide covers the broader revenue picture beyond programmatic
- First-Price vs Second-Price Auctions
- Bid Shading
- Private Marketplace Deals
- ads.txt
- Programmatic Guaranteed vs Preferred Deals
- Header Bidding
- Publisher Monetization
Green-numbered articles are foundational for both paths.
All Articles in This Series
What Is Real-Time Bidding (RTB) and How Does It Work?
The auction protocol behind programmatic, from bid request to ad render in 100 to 200 milliseconds.
Read articleDSP vs SSP: What Is the Difference and How Do They Work Together?
How demand-side and supply-side platforms serve different roles and connect through exchanges.
Read articleWhat Is an Ad Exchange and How Does It Fit into Programmatic?
The marketplace layer where DSP bids meet SSP inventory, including fees and transparency.
Read articleWhat Are Private Marketplace Deals (PMPs) in Programmatic Advertising?
How invitation-only auctions work, setup differences versus open exchange, and when to use them.
Read articleProgrammatic Guaranteed vs Preferred Deals: Which Deal Type Should You Use?
Programmatic guaranteed vs preferred deals compared. Fixed pricing, inventory reservation, setup, and when to choose each deal type.
Read articleFirst-Price vs Second-Price Auctions: How Ad Pricing Changed in Programmatic
How first-price auctions replaced second-price in programmatic. Impact on CPM rates, bid shading, and what it means for advertisers and publishers.
Read articleWhat Is Bid Shading and How Does It Affect Your CPM?
How bid shading works in first-price auctions. The algorithm, typical CPM savings, and what it means for both advertisers and publishers.
Read articleWhat Is ads.txt and Why Every Publisher Needs It
Why publishers need ads.txt. Format, DIRECT vs RESELLER, setup steps, and how missing ads.txt costs you programmatic ad revenue.
Read article