Learn

← Track B: Client-Side Prebid.js
L3-L4

B7

GAM line-item setup

In this lesson you will
  • Build the GAM scaffold: key-values, Price Priority (type 12) line items per bucket, the universal creative.
  • Choose top-price vs send-all-bids trafficking and reason about UPR (Unified Pricing Rules) interaction.

Prebid hands the ad server a price as a key-value. But GAM does not know that key means money until you build line items, one per price bucket, that say "if hb_pb = 2.40, this is a $2.40 bid." This is the AdOps half of header bidding, and where setups silently break.

The GAM scaffold

  • Register the key-values (hb_pb, hb_adid, ...) in GAM so line items can target them.
  • Price Priority line items (type 12), one per price bucket, each targeting its hb_pb value and priced to match it.
  • A single universal creative that renders whichever bid won, by reading hb_adid and pulling the cached creative.
TraffickingMeaning
Top-priceOnly the winning bid’s keys are sent. Fewer line items, no per-bidder reporting.
Send-all-bidsEvery bidder’s keys are sent. More line items, but you can report and target per bidder.

Watch out

Unified Pricing Rules (UPR) can override floors and interact with these line items. A UPR set above your header demand can quietly block it, a classic "why is my partner not winning" cause.

Quick check

You use $0.10 buckets from $0 to $20. Roughly how many Price Priority line items do you need?

Note

If hb_adid never reaches GAM, the universal creative has nothing to render and the slot goes blank, a textbook header-bidding failure.

Key concepts
Price Priority line items (type 12)Universal creativeTop-price vs send-all-bids traffickingUnified Pricing Rules (UPR)
Going deeper

To really lock this in: compute the line-item count for a granularity, write key-value targeting for a $4.50 line item, and explain a missing-key failure mode.

Where this leads
PRACTICE

Proposed line-item generator.

DEBUG

Proposed "creative renders blank because hb_adid is undefined in GAM" reproduction.

Bidcliq Academy · B7: GAM line-item setup