Learn

← Track B: Client-Side Prebid.js
L3

B6

Price granularity, bucketing, and targeting key-values

In this lesson you will
  • Explain why bids are quantized into price buckets.
  • Configure standard vs custom priceGranularity.
  • Map winning bids to hb_pb, hb_adid, hb_size, hb_format, and per-bidder variants under send-all-bids.
  • Understand query-string length risk.

An ad server cannot target on "exactly $2.4173". It targets on buckets. So Prebid rounds every bid into a price bucket and passes that as a key-value. Choose the buckets too coarse and you round real money away on every impression.

Bids are quantized into price buckets because the ad server’s line items target discrete values, not a continuous price. priceGranularity controls how fine those buckets are.

GranularityBuckets
StandardPredefined steps (roughly $0.50 increments up to $20). Simple, fewer line items.
CustomYou define the ranges and increments yourself, finer where your bids cluster.

The targeting keys

The winning bid becomes key-values the ad server reads: hb_pb (the bucketed price), hb_adid (the creative id), hb_size, and hb_format. Under send-all-bids, every bidder gets its own suffixed set (hb_pb_rubicon, hb_pb_pubmatic, ...).

Watch out

Send-all-bids multiplies the number of keys, and the ad request’s query string has a length limit. Too many keys get truncated, which silently breaks targeting.

Quick check

With $0.10 buckets, a bid of $2.47 is passed to the ad server as what `hb_pb`?

Key concepts
Price bucketsStandard vs custom priceGranularityhb_pb / hb_adid / hb_size / hb_formatSend-all-bids key explosion
Going deeper

To really lock this in: define a custom bucket scheme and compute the keys produced for a given winning bid.

Where this leads
PRACTICE

Proposed granularity designer.

DEBUG

Proposed "bid lost revenue to a coarse bucket" reproduction.

Bidcliq Academy · B6: Price granularity, bucketing, and targeting key-values