Skip to content

Bid Reduction

Bid Reduction is an ML-driven optimization that probabilistically removes bid requests to bidders that are unlikely to win the auction. By eliminating unnecessary bid requests, it lowers latency and infrastructure costs while preserving revenue.

When enabled via bidReductionEnabled, Htag fetches a bid reduction configuration from the ws-header-bidreduction service. This configuration contains sampling rates for each bidder, optionally overridden per placement. During ad unit assembly, each bidder’s sampling rate determines the probability that its bid request is kept.

  1. On startup (and on each ad refresh), Htag fetches the config from the backend
  2. For each bid request, Htag looks up the sampling rate for that bidder and placement
  3. A random number is compared against the sampling rate — if the random number is below the rate, the bid is kept; otherwise it is removed
  4. Removed bids emit a bidReduced tracking event for analytics
  5. Google and Amazon bidders are never subject to bid reduction

Sampling rates are resolved with placement-level overrides taking priority over tag-level defaults:

  1. If the placement has a specific rate for the bidder, use it
  2. Otherwise, fall back to the tag-level rate for the bidder
  3. If neither exists, the bid is always kept (no reduction)

For example, if rubicon has a tag-level sample of 0.15 but placement billboard-top overrides it to 0.8, then rubicon bids on billboard-top are kept 80% of the time, while rubicon bids on all other placements are kept 15% of the time.

Bid reduction is designed to never block ad delivery:

  • If the config fetch fails, all bids proceed normally
  • If the config fetch times out (80ms), all bids proceed normally
  • If the feature is not enabled, all bids proceed normally
  • After a successful fetch, the config is cached using the server-provided TTL and served from cache on subsequent calls
  • After a failed refresh, stale cache is served during a 5-second backoff period before retrying

When a bid is removed, Htag emits a bidReduced event with the following attributes:

AttributeTypeDescription
tagIdstringThe website/tag identifier
adUnitCodestringThe placement element ID
bidderCodestringThe bidder that was removed
samplestringThe sampling rate that was applied
modelVersionstringThe ML model version that produced the config