Protected Audience API (PAAPI) for GPT Module

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.

Publisher Integration

To use PAAPI with GPT:

Explicit configuration

By default, Prebid.js attempts to configure GPT slots for PAAPI together with their targeting (that is, when setTargetingForGPTAsync is called).

For more control how GPT slots are configured, you can set configWithTargeting: false and explicitly call setPAAPIConfigForGPT. For example:

pbjs.setConfig({
    paapi: {
        enabled: true,
        defaultForSlots: 1,
        gpt: {
            configWithTargeting: false
        }
    }
})
pbjs.requestBids({
  // ...
  bidsBackHandler: function(bids, timedOut, auctionId) {
    pbjs.setPAAPIConfigForGPT();
    // ...
  }
})

Refreshing Ads

It’s important to invoke the pbjs.setPAAPIConfigForGPT() function within the bidsBackHandler whenever new bids are requested, such as when refreshing ad slots. This ensures that the auctionConfig is manually applied to a GPT slot when autoconfig is disabled. Without this manual configuration, GPT slots will not be properly set up to handle new bids, potentially resulting in duplicate impression calls.

See the API reference for more options.