Header bidding is a sequence, not a product. Prebid runs an auction in the page, then the ad server uses those prices in its own decision.
The page loads Prebid and the ad server tag. For Google Ad Manager, the usual integration holds the first ad request so line items do not run before Prebid has written its keys.
Prebid calls the bidders on each ad unit together. When the bids are back, or the auction timeout fires, it writes targeting for the bids that made it. The ad server is called after that. Its line items - direct, house, or Prebid price buckets - compete as they always have.
If a Prebid line item wins, Prebid renders that bidder's creative. If something else wins, the Prebid bid is unused. A response that arrives after the timeout is not part of the ad server's decision. Prebid's troubleshooting guide says this directly.
disableInitialLoad holds GAM. requestBids starts the auction. setTargetingForGPTAsync copies hb_ keys onto the slots. googletag.pubads().refresh() is the ad server call, not a second creative refresh. The full example also sets a failsafe timer outside Prebid, in case the library never calls back. That timer is separate from bidderTimeout. See bidder timeout.
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
});
pbjs.que.push(function () {
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
});
function sendAdServerRequest() {
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
googletag.cmd.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
}You can see each bidder's price before GAM decides, and you can tell a slow partner from a partner who never answers. The auction timeout is the knob that decides how long the page is willing to wait.
If the ad server runs before targeting is set, header bidding never enters the choice. If a later refresh sends the same hb_ keys without a new auction, the same bid can render again. Prebid documents that as stale rendering. A timeout copied from another site is a guess, not a setup.