This module allows Prebid.js to support PAAPI (formerly FLEDGE) by integrating with GPT’s support for component auctions.
To learn more about PAAPI in general, go here.
Note that Prebid can’t help anyone with which fields to include in auctionconfig, but you can start by looking in this section of the PAAPI documentation.
To use PAAPI with GPT:
include this module with your Prebid.js bundle; this also automatically includes the PAAPI module
gulp build --modules=paapiForGpt,...
By default, Prebid.js attempts to configure GPT slots for PAAPI at the end of each auction. This requires GPT to be loaded before the first Prebid auction is started; to avoid this requirement, or for more control in general over GPT slot configuration, you can use setPAAPIConfigForGPT
.
First, disable automatic configuration of GPT slots:
pbjs.setConfig({
paapi: {
gpt: {
autoconfig: false
}
}
})
You may then use setPAAPIConfigForGPT
, typically from a bidsBackHandler
:
pbjs.requestBids({
// ...
bidsBackHandler: function(bids, timedOut, auctionId) {
pbjs.setPAAPIConfigForGPT();
// ...
}
})
See the API reference for more options.