Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 2.62 KB

File metadata and controls

67 lines (49 loc) · 2.62 KB
layout page_v2
page_type module
title Module - paapiForGpt
description how to use PAAPI with GPT
module_code paapiForGpt
display_name Fledge (PAAPI) for GPT
enable_download true
sidebarType 1

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.

Related Reading