Guidesprogrammatic advertisingreal-time bidding (RTB)

Media-Buying Methods: Programmatic, RTB, Header Bidding, and Private Marketplace

RTBDSPSSPad exchangeprogrammatic guaranteedinsertion ordersecond-price auctionOpenRTBad requestbid requestbid responseimpression trackingprogrammatic reservedad networklatencyunderfillingoverfillingwaterfallremnant inventorypremium inventorytargetingeCPMCPCCPACPMCTRconversion rateA/B testingdynamic creativesJSON

The online advertising industry is built on a diverse stack of AdTech platforms — ad servers, DSPs, SSPs, ad networks, and ad exchanges — each playing a distinct role in how media is transacted. Understanding the mechanics behind each media-buying method is essential for anyone building, operating, or evaluating these systems.

This chapter covers the main media-buying processes: manual buying, programmatic direct, real-time bidding (RTB), private marketplace (PMP), and the publisher-side mechanisms that tie them together.

The Main Media-Buying Processes

Below is an overview of the main media-buying processes covered here:

The main media-buying processes in programmatic.


Manual Media Buying

In the early days of online advertising, buying and selling ads between advertisers and publishers was an entirely manual process. Advertisers would work directly with publishers and deliver ad tags by hand. Because no technological platforms were involved, there was no way to define targeting or generate reports.

The introduction of ad servers changed that, and in doing so, kickstarted the broader programmatic media-buying evolution.


Programmatic Media Buying

What Does "Programmatic" Mean?

The term programmatic is used loosely across the industry, but a precise definition is:

Programmatic refers to the use of technology, algorithms, and data to buy and sell online media in an automated fashion.

This stands in contrast to manual media buying, which is done person-to-person without any algorithmic involvement.

The diagrams below illustrate the difference between the two execution models.

Manual media buying

An example of manual media buying

The execution of a manual media transaction:

  • The advertiser and publisher sign an insertion order (IO) — a contract defining campaign terms such as flight dates and placement.
  • The advertiser sends ad tags (HTML snippets) to the publisher.
  • The publisher adds those tags to its website and launches the campaign.

Programmatic media buying

An example of programmatic media buying

The execution of a programmatic media transaction:

  • The advertiser and publisher still sign an IO, just as in manual transactions.
  • The advertiser's AdOps team configures the campaign in the advertiser's ad server and sends ad tags to the publisher.
  • The publisher's AdOps team sets up the campaign, adds the advertiser's ad tags to the publisher's ad server, and starts the campaign.

While the surface-level steps look similar, the key advantages of using ad servers are significant: targeting, placement control, consolidated reporting, and the elimination of repetitive manual tasks.

For example, rather than the publisher simply displaying a static ad when a page loads, the ad tag can redirect to the advertiser's ad server — which can then decide which ad to show based on factors like the user's location and device type.

The speed differential is equally significant. Creating and launching a campaign in a programmatic DSP takes a matter of minutes. Without programmatic technology, the same process can take several days. Similarly, changes made within a programmatic platform are reflected close to real time, whereas changes routed through a publisher's AdOps team can take days to implement. For brands that need to react quickly to market conditions or performance data, this difference is material.


Campaign Optimization: Manual vs. Algorithmic

Campaign optimization means making adjustments to improve performance and make media buys more economical. This can involve changes to targeting criteria, creative assets, or bid levels — and it can be done either manually or via automated algorithms.

Manual Optimization

Manual optimization typically involves advertisers adjusting their CPC, CPA, and CPM bids, usually on a daily basis.

The process draws on data broken down by the dimensions available in the ad platform — geolocation, gender, interests, device type, and so on — to identify which segments are worth extending or restricting targeting for. The goal is to construct targeting criteria that produces the most optimal CTR, CPA, or conversion rate.

Key data inputs for manual optimization include:

  • Ad CTRs
  • Total clicks generated
  • Total impressions generated

A standard manual optimization workflow looks like this:

  1. Break down campaign data by one or more dimensions — geolocation, device type, publisher domain, time of day, carrier, etc.
  2. Filter out statistically insignificant data (e.g., ad units with very few impressions or clicks).
  3. Identify the best- and worst-performing values within each dimension.
  4. Review relevant metrics for the campaign goal — for example, effective CPM (eCPM) on a lead-generation objective.
  5. Blacklist (exclude from targeting) segments that are underperforming or delivering no measurable value.

Other optimization techniques include:

  • A/B testing: Running variants of creatives simultaneously to determine which performs better.
  • Dynamic creatives: Personalizing messaging or visual elements for different audience segments — for example, inserting a city name to match the user's location.
  • Experimenting with traffic sources: Allocating a small portion of budget (typically 5–10%) across different sources, formats, and platforms, then comparing metrics like eCPA and eCPM to identify the strongest performers.

Automated Optimization

Automated optimization uses algorithms to drive the optimization process. Many AdTech platforms include built-in algorithmic optimization functionality, ranging from bid management to audience targeting.

The critical ingredient for effective automated optimization is historical data. Algorithms can only make quality decisions when they have sufficient, high-quality data to work from.


Programmatic Direct

Programmatic direct — also called programmatic guaranteed, programmatic reserved, or automated guaranteed — is a method of buying and selling media where no auction takes place. Instead, an advertiser and publisher agree on specific inventory and a CPM upfront, and the transaction is executed programmatically through AdTech platforms.

Like manual media buying, programmatic direct begins with a negotiated deal. But technology handles the execution, providing scale that wasn't possible before.

An example of programmatic direct

The process resembles placing an order on an e-commerce platform, except the "product" is media inventory:

  1. An advertiser browses through publisher inventory catalogs.
  2. It selects placements, flight dates, and impression volume.
  3. It configures creatives and any additional tracking pixels.
  4. It places the order on the platform.
  5. The publisher audits and verifies the campaign.
  6. The order executes programmatically, with minimal AdOps involvement beyond the audit.

Advantages for advertisers: Programmatic direct allows advertisers to secure premium inventory at a fixed price before that inventory is offered on an open RTB auction. While CPMs may be higher than in RTB, advertisers can guarantee access to audiences they might otherwise miss.

Advantages for publishers: Direct deals command higher CPMs than open-auction inventory.

Disadvantages for advertisers: Targeting options are limited. Ads are shown based on the context and known audience of a specific website — not behavioural signals about individual users. For example, a bank can target visitors of a financial news site, but cannot target, across multiple sites, users who previously visited the bank's own website (which RTB enables).

Disadvantages for publishers: Not all inventory may be sellable via direct deals, which is why most publishers configure a waterfall to handle unsold impressions downstream.


Real-Time Bidding (RTB)

Background and Origins

The mid-to-late 1990s saw the first wave of ad networks emerge, and by the mid-2000s, hundreds were operating in the market. But ad networks soon ran into a structural problem: underfilling and overfilling.

An explanation of underfilling and overfilling of programmatic media

Publishers noticed their ad networks weren't selling all available inventory, so they began working with multiple networks simultaneously. This solved the fill-rate problem but introduced another: adding multiple ad network tags to a website caused latency and degraded the user experience.

To address this, a new type of platform emerged — initially called network optimizers, later known as supply-side platforms (SSPs).

The first SSPs to market included Collective, PubMatic, Admeld, and Magnite (formerly The Rubicon Project).

Rather than embedding multiple network tags, publishers placed a single SSP tag. The SSP then determined which ad networks or buyers were interested in purchasing the available impression and completed the transaction.

The same era that produced SSPs also gave rise to demand-side platforms (DSPs) — platforms designed to give media buyers (advertisers and agencies) a centralized way to access publisher inventory made available through SSPs.

Early DSPs included Invite Media (later acquired into the Google Marketing Platform), dataxu, and MediaMath.

Around the same time, ad exchanges emerged to solve inventory liquidity issues by auctioning publisher inventory on an impression-by-impression basis.

An example of how real-time bidding works in programmatic media buying.

The ad exchange handles the buying and selling of media between an advertiser and publisher.

Ad exchanges operate similarly to stock exchanges: just as stock exchanges facilitate the buying and selling of securities, ad exchanges handle the buying and selling of ad impressions between advertisers and publishers in real time.

Industry note: In 2007, the three largest ad exchanges — DoubleClick, AdECN, and RightMedia — were acquired by Google, Microsoft, and Yahoo!, respectively.

This impression-level, real-time transaction mechanism is what became known as real-time bidding (RTB).


What Is Real-Time Bidding (RTB)?

Real-time bidding is a protocol introduced in the late 2000s that fundamentally changed how online media is bought and sold.

Originally designed to help publishers sell remnant inventory, RTB is now used to sell all types of inventory, including premium placements.

Rather than buying blocks of impressions from a single publisher, RTB allows advertisers to purchase individual impressions across multiple publishers simultaneously — bidding based on real-time signals about both the placement and the user at that specific moment.

Publishers benefit from higher CPMs as more buyers compete for each impression.

The OpenRTB Protocol

The RTB Project — formerly the OpenRTB Consortium and now referred to as OpenRTB — is a group led by the Interactive Advertising Bureau (IAB), comprising AdTech companies from both the buy and sell sides.

Started in November 2010, OpenRTB provides AdTech vendors with an API specification that allows platforms to communicate using a common language for buying and selling digital media.


How RTB Works

The RTB process is technically complex and involves multiple AdTech platforms operating in concert.

A detailed look at how real-time bidding (RTB) works.

Here is a step-by-step breakdown:

  1. A user visits a webpage (e.g., example.com).
  2. The page contains an ad slot with JavaScript code that fires an ad request to the publisher's first-party ad server, passing data about the user — location, device type, operating system, etc.
  3. The ad server checks whether any direct campaigns match the user. If not, it returns the SSP's ad tag, which will offer the impression in an RTB auction.
  4. The browser loads the SSP script. User information and placement details (page URL, ad size, restrictions) are passed to the ad exchange.
  5. The ad exchange sends a bid request to all connected bidders, announcing the available impression.
  6. Bidders evaluate the bid request against their targeting parameters (page domain, context, user data, etc.) and submit bid responses — each containing a bid price and the ad markup they want to display, if they choose to bid at all.
  7. The ad exchange receives all bids. The impression is awarded to the highest bidder, who pays the second-highest bid price plus $0.01 — the standard second-price auction mechanism. A win notice is sent server-to-server or via a price macro in the ad markup. The winning DSP's ad markup is sent to the browser.
  8. The DSP's ad markup loads in the browser and retrieves the creative from the DSP's ad server (or, commonly, from a CDN). An impression-tracking pixel fires, notifying the ad server that the impression has been served.
  9. The creative renders in the browser and the ad is shown to the user.

The entire process — from ad request to ad render — takes place within 100–150 milliseconds. For context, a human blink takes approximately 300 milliseconds.

Each time a page loads or refreshes, a new ad request fires and a new RTB auction begins.


Bid Requests and Bid Responses

Bid requests and bid responses use JavaScript Object Notation (JSON) format for its human readability and compactness.

Below is an example of a partial bid request from the IAB's OpenRTB 2.5 specification:

{
  "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
  "at": 1,
  "cur": [ "USD" ],
  "imp": [{
    "id": "1",
    "bidfloor": 0.03,
    "banner": {
      "h": 250,
      "w": 300,
      "pos": 0
    }
  }],
  "site": {
    "id": "102855",
    "cat": [ "IAB3-1" ],
    "domain": "www.foobar.com",
    "page": "http://www.foobar.com/1234.html",
    "publisher": {
      "id": "8953",
      "name": "foobar.com",
      "cat": [ "IAB3-1" ],
      "domain": "foobar.com"
    }
  },
  "device": {
    "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
    "ip": "123.145.167.10"
  },
  "user": {
    "id": "55816b39711f9b5acf3b90e313ed29e51665623f"
  }
}

And a corresponding bid response:

{
  "id": "1234567890",
  "bidid": "abc1123",
  "cur": "USD",
  "seatbid": [{
    "seat": "512",
    "bid": [{
      "id": "1",
      "impid": "102",
      "price": 9.43,
      "nurl": "http://adserver.com/winnotice?impid=102",
      "iurl": "http://adserver.com/pathtosampleimage",
      "adomain": [ "advertiserdomain.com" ],
      "cid": "campaign111",
      "crid": "creative112",
      "attr": [ 1, 2, 3, 4, 5, 6, 7, 12 ]
    }]
  }]
}

The OpenRTB specification defines dozens of objects and attributes. These objects help DSPs evaluate whether an impression is worth bidding on and pass relevant data back through the ecosystem.

Key OpenRTB objects and their primary attributes include:

Imp (Impression)

  • id
  • banner
  • video
  • audio
  • native

Banner

  • w (width)
  • h (height)

Video

  • minduration
  • maxduration
  • skip

Additional objects exist for audio, native, and in-app mobile ads.

Publisher

  • id
  • name
  • domain

Device

  • ua (user agent)
  • geo
  • devicetype
  • make
  • model
  • os
  • language
  • carrier

Geo

  • lat
  • lon
  • country
  • region
  • city
  • zip

User

  • id
  • yob (year of birth)
  • gender

Data

  • id
  • name
  • segment

Segment

  • id
  • name
  • value

For a complete reference, consult the OpenRTB 2.5 and 3.0 specifications.


Benefits of RTB

For Advertisers

Increased ad effectiveness: Campaign results are available in real time, allowing advertisers (or DSP algorithms) to make rapid adjustments to improve performance.

Fraud detection: Real-time reporting makes it easier to identify suspicious activity — such as abnormally high CTRs. Many RTB platforms incorporate built-in ad-fraud detection and prevention tools to reduce wasted spend.

For Publishers

Increased revenue: RTB opens inventory to dozens or even hundreds of competing buyers, improving campaign matching and driving up effective CPMs.

Optimized price floors: Real-time analytics allow publishers to dynamically adjust their CPM floor prices to maximize revenue.


Transparency in the RTB Ecosystem

In the era of direct media buying, both advertisers and publishers had clear visibility into what media cost and what each party received. As programmatic intermediaries have multiplied, that clarity has eroded considerably.

An ad impression can pass through five or more distinct parties before reaching the end user — each taking a commission or fee. Advertisers are typically informed only about the gross media cost (e.g., $10 CPM), with little or no visibility into what share of that ultimately reaches the publisher.

The main platforms in the programmatic media buying landscape

The diagram illustrates the number of intermediaries that can sit between an advertiser and a publisher.

Intermediary Fees in Practice

A 2020 report by PwC and the Incorporated Society of British Advertisers (ISBA), the Programmatic Supply Chain Transparency Study, found that on average publishers received just 51% of advertiser spend, with 35% going to intermediaries (agencies and AdTech companies). A further 15% — referred to as the "unknown delta" — could not be accounted for at all.

Key findings from that report:

  • Demand-side tech fees (ad serving, verification tools, data) averaged 10% of advertiser spend.
  • SSP fees averaged 14% of publisher revenues, equivalent to roughly 8% of advertiser spend.
  • The share of spend reaching publishers ranged from 49% to 67% across the study sample.

A 2014 IAB-sponsored study conducted by PwC reached a similar conclusion — that roughly 50% of an advertiser's media budget was consumed by fees and commissions:

"We consistently heard throughout our conversations with industry executives that programmatic ad tech fees are substantial — generally close to 50% or more. These ad tech fees were often referred to as the 'ad tech tax'... In many instances, these fees get compounded as fees from one supplier get added to the costs of the next supplier in the programmatic value chain."

IAB Programmatic Revenue Report 2014 Results, PwC/IAB, July 2015

The total fee burden varies significantly depending on how many intermediary platforms an advertiser uses. An advertiser purchasing directly through a single DSP via an ad exchange pays fewer fees than one routing spend through an agency, a trading desk, and multiple platforms.

Advertisers may also pay for third-party data from DMPs and additional verification services (viewability, brand safety). While data costs are generally disclosed, DSPs sometimes add undisclosed margins on top.

Industry Direction

Lack of transparency in the programmatic supply chain remains a recognized issue. Progress is being made — many AdTech vendors have moved toward more explicit fee disclosure — but the structural complexity of the ecosystem makes full visibility difficult to achieve without deliberate effort from all participants.


Private Marketplace (PMP)

While RTB helped publishers monetize remnant inventory, premium publishers found that open-auction dynamics were eroding the value of their best inventory. At the same time, advertisers grew concerned about ad quality and viewability.

Private marketplace (PMP) emerged as a solution to both problems.

PMP is an invite-only variation of the RTB model where publishers offer premium inventory to a select group of buyers. Participating advertisers can bid on that inventory before it is released to a public RTB auction.

Private marketplace (PMP)

Although CPMs on a PMP are typically higher than in public auctions, advertisers gain first access to a publisher's most desirable placements.

Publishers identify PMP inventory by passing a Deal ID in the bid request. Advertisers must have a matching Deal ID configured in their DSP to participate.

An example of how private marketplace (PMP) deals work in programmatic media buying.


Comparing the Three Media-Buying Approaches

The table below summarizes how RTB, programmatic direct, and PMP compare across key dimensions.

Media Execution Type Public Auctions Private Marketplaces (PMP/Deal ID) Programmatic Direct Non-Programmatic (Direct Campaigns)
Price Auction Auction and/or Deal ID terms Pre-defined Pre-defined
Direct Advertiser-Publisher Relationship No Yes Yes / limited Yes
Inventory Volume Non-guaranteed Non-guaranteed Guaranteed Guaranteed
Inventory All inventory that the publisher decides to put on public auction Premium inventory All, including premium inventory; Bulk inventory (sometimes robust targeting is available) All, including premium inventory; Bulk inventory with limited targeting
Delivery DSP / over RTB pipes DSP / over RTB pipes with Deal ID set Programmatic-direct platform integrated with the publisher's ad server Email/phone, manual ad tags entered in the publisher's ad server
Advantages • Per-impression buying process • Advertisers and publishers use a single dashboard • Easy testing and adjusting Insights • Ability to sell remnant ad space • Transparency of purchased inventory and pricing • Programmatic efficiency without middlemen • Becoming an industry standard • Can remove the need for a direct-sales team • Transparency • Automation • Better insights and control • Directness • Guaranteed inventory volume • Transparency • Direct advertiser-publisher relationship • Insights and better control • Guaranteed inventory volume
Disadvantages Limited access to premium inventory More expensive inventory Direct deals and pre-defined prices may lead to overpaying for inventory • Not easily scalable • Slow process

RTB, programmatic direct, and private marketplace differ primarily in inventory type, pricing mechanism, and degree of targeting flexibility.


The Publisher's Waterfall

With multiple media-buying channels available, publishers need a way to prioritize and sequence demand. The standard mechanism for this is the waterfall (also called a daisy chain or waterfall tags).

Waterfalling is a process used to sell remnant inventory after direct deals have been fulfilled. It gets its name from the sequential, cascading structure: demand sources are queried one at a time, in order of expected yield, until the impression is filled.

The trade-off is straightforward — impressions that travel further down the waterfall tend to clear at lower CPMs, as each successive tier typically represents lower-priority demand.

The Publisher's Dilemma: High CPM or High Fill Rate?

Publishers face a recurring tension: should they hold out for a higher CPM and risk leaving impressions unsold, or should they prioritize fill rate and accept lower CPMs across the board?

An explanation of how waterfalling works in programmatic advertising.

The typical waterfall priority order looks like this:

  1. Direct sales — highest CPMs, negotiated directly with advertisers.
  2. SSPs and open RTB auctions — competitive bidding for remaining inventory.
  3. Ad networks — lower-CPM fallback for inventory that didn't clear in auction.

How Waterfalling Is Implemented

The publisher's AdOps team configures passback tags in the publisher's ad server and in each ad network's system. These passbacks are typically set up in fields labelled Fallback Ads, Passbacks, Redirects, or Default Ads, depending on the platform.

Each tier is configured to "pass back" to the next tier when it cannot fill an impression. For example, the premium ad network would be configured to pass back to the remnant ad network if no fill is available.

Waterfall Scenarios

Scenario 1

A direct deal with Advertiser #1 is available for the impression — the ad is served directly.

Waterfall scenario 1

Scenario 2

No direct deal matches the impression. The ad server moves to the next tier in the waterfall, querying the SSP or ad network for a fill.

The waterfall continues until either an ad is served or all available tiers have been exhausted — in which case a house ad or blank space may be displayed.


Understanding these media-buying methods — how they differ in execution, pricing, targeting depth, and supply chain structure — is foundational for anyone working within or building on top of programmatic infrastructure. Each method involves distinct trade-offs, and most publishers and advertisers use several in combination to optimize both revenue and reach.