This example uses a test version of Prebid.js hosted on our CDN that is not recommended for production use. It includes all available adaptors. Production implementations should build from source or customize the build using the Download
page to make sure only the necessary bidder adaptors are included.
Line 32: Enable the mode for sending all bids to the ad server
At this point, either the timeout has hit or all prebid bidders have responded. This is a good time to let prebid.js know that the ad server keywords it generates should be for all bids.
pbjs.enableSendAllBids() lets prebid.js know that the ad server keywords it generates should be for ALL bids, not just for the top winning bid.
It must be called before calling
pbjs.setTargetingForGPTAsync(), with sendAllBids enabled, will now attach bid keywords for all bids, instead of just the top winning bid, to the ad server requests. Your ad server will see all the bids, make the ultimate decision on which one will win, and generate reporting on historical bid prices from all bidders.
If you prefer to manually set the prebid keyword targeting, you can get the bid information through
For more information about these methods, see the Publisher API Reference.