Digital Publishing News.Search

Prebid adds an option to replace bids that expire before an ad appears

Version 11.53 can request a fresh bid when an ad takes too long to reach the screen. If no usable replacement arrives, the publisher’s existing expiry-blocking setting still matters.

Development: · First published: · Staff Writers · AI-assisted reporting

Prebid.js, the open-source software publishers use to run header bidding auctions, added an option to replace an expired bid before displaying its ad. The November 20 release, version 11.53.0, introduces a publisher-supplied function named auctionOptions.replaceExpiredBid. It can return another bid immediately or provide one after additional work finishes.

The change addresses a gap between an auction and reaching the screen. A reader may take time to scroll to an ad or trigger an interstitial, an ad shown between page views. The ad server chooses an ad for a placement using the auction’s targeting information. A bid that was valid at that point can have expired by the time the ad is actually requested for display.

Jump to a section

An auction can finish long before its ad appears

An advertising bid includes a lifetime. In Prebid, that lifetime is associated with the response’s timestamp and its time-to-live value, with configuration affecting the effective expiry check. Expiry is therefore a separate clock from how long the original auction waited for bidders. Finishing an auction promptly does not keep its selected bid valid indefinitely.

Consider an illustrative placement whose original bid has an effective expiry point 60 seconds after the page starts. The reader reaches the ad at 90 seconds. That bid is now 30 seconds beyond its effective lifetime. If another compatible bid arrived at second 89 and remains valid until second 149, it still has 59 seconds left when the ad needs to appear.

The new option gives the rendering process a way to ask for that usable alternative. These times are an explanatory model, not a default Prebid lifetime or an observed publisher result. The point is the ordering: the original auction can succeed, the reader can wait, and the display request can arrive after that original bid expires.

Illustrative display at second 90; expiry points include the assumed configuration
BidEffective expiryState at display time
Original bidSecond 60Expired by 30 seconds
Available replacementSecond 14959 seconds of validity remain

A replacement must fit the original ad placement

The tagged implementation checks more than whether a replacement exists. It must belong to the same ad unit, meaning the same configured placement, and use the same media type. A video bid cannot simply replace a banner bid in that placement. The code also checks compatibility of the rendering method, the software that puts the ad on screen, as well as expiry and whether the candidate has already been used or won elsewhere.

A publisher’s replacement function can return an available bid or an eventual result. Prebid waits when the function returns a promise, JavaScript’s mechanism for delivering a result later. The upstream tests include concurrent requests that wait on the same replacement, rather than initiating another replacement for every lookup of the expired ad identifier.

The function is consulted when an eligible expired bid is about to be rendered. It does not run merely because an ordinary lookup requests information about a bid. The implementation also keeps already-rendered, deferred-rendering and already-winning bids on their existing paths. Those boundaries matter because replacing an unused late bid is different from taking over an ad that has already progressed further.

No valid replacement leaves the existing expiry rule in control

The rendering code falls back to the original bid if the replacement function returns nothing useful, throws an error or produces a rejected promise. It also rejects a replacement for a different placement or media type. Returning to the original bid does not, by itself, establish that the ad will be blocked: the normal rendering checks still apply.

Prebid’s expiry-blocking documentation describes suppressExpiredRender as a separate setting. When enabled, it prevents an expired bid from rendering. Its documented default is false. Installing a version that supports replacement therefore does not mean every expired ad is automatically replaced or suppressed. A valid replacement and a decision to block an unreplaced expired ad are different mechanisms.

DPN checked 17 isolated cases using the actual replacement functions from the version 11.53.0 source, with controlled configuration and bid objects. Valid synchronous and asynchronous replacements were selected. Wrong-placement, expired-candidate and failure cases returned the original bid. These were code-path checks with dependency substitutes, not live auctions, the complete upstream test suite or measurements of advertising revenue.

Selected outcomes from DPN’s isolated checks of the tagged replacement functions
Controlled caseBid returned to normal rendering
Replacement function not configuredOriginal bid
Compatible, unexpired replacement returnedReplacement bid
Replacement belongs to another placementOriginal bid
Replacement function throws or rejectsOriginal bid

Replacing the creative does not rerun the ad server’s earlier decision

The published integration example illustrates the feature with deliberately short-lived, mocked bids. Its replacement function can start another Prebid auction when display is delayed. The example explicitly notes that ad-server targeting cannot be updated at that point: it still reflects the expired bid. That is an important limit on interpreting what a new creative on screen proves.

There are consequently several outcomes to keep separate. Selecting a fresh bid in the replacement function is one event. Rendering an ad successfully is another. The ad server’s earlier selection and the eventual payment record are different evidence again. The release does not supply a measured revenue increase, and a successful replacement alone is not a measurement of higher fill rate or net earnings.

A replacement that needs a new auction can also finish later than one that returns an available bid immediately. The useful comparison is the time until a usable ad appears, alongside the relevant rendering outcome, rather than just whether the first auction completed. The separate guide to header bidding timeouts explains the original auction-waiting decision. This release adds a later opportunity to replace an expired response; it does not merge those two clocks.

Related reading