Configure Protected Audience API for Prebid.js version 9.0.0 or later

Info: Starting in June 2025, Index is pausing support for the Protected Audience API. After this date, you will no longer receive Protected Audience API demand from Index, even if your inventory is configured to be eligible for it.

Before you begin: You must be using Google Ad Manager as your publisher The owner of a website or app where advertisements are served. ad server A platform that manages, stores, and delivers advertisements to a publisher's site. and the PAAPI for GPT Module in your Prebid.js An open-source library for publishers to implement header bidding on their websites and manage multiple header bidding partners. configuration.

Note: If you are upgrading to Prebid.js version 9.0.0 or later, you will not be able to use the previous PAAPI module anymore. You must only use the PAAPI for GPT Module and update your configurations according to the instructions provided in this topic.

To receive Protected Audience API auction demand, complete the following steps:

  1. In Google Ad Manager, click Admin, then Global settings, and under Ad preference settings, make sure that the following settings are enabled:
    • Protected Audience API
    • Allow testing on up to 100% of my inventory with non-Google sellers, regardless of performance impact
      screenshot showing the protected audience api options
    • For more information about these settings, see Google’s documentation on Protected Audience API and Ad Manager.

  2. Build the PAAPI for GPT Google Publisher Tag (GPT). An ad tagging library for Google Ad Manager (GAM) which is used to dynamically build ad requests. It takes key details from a publisher, such as ad unit code, ad size, and custom targeting, builds the request, and displays the ad on web pages. Module in your Prebid.js configuration by adding paapi to the list of modules that you are already using. For more information about how to add the module, see Prebid’s Protected Audience API (PAAPI) for GPT Module documentation.
  3. Complete the following steps to make your ad units eligible for Protected Audience API demand:
    1. In the pbjs.setConfig().paapi field, set the defaultForSlots parameter to 1 and also set the enabled parameter to true. See step 3(b) below for an example of this configuration.

    2. In the paapi.gpt.configWithTargeting field, set configWithTargeting to true. For more control over configuring GPT slots to use PAAPI, you can set the configWithTargeting to false and use the setPAAPIConfigForGPT API.

      The following code is an example of the defaultForSlots and configWithTargeting configurations:

        pbjs.que.push(function() {
          pbjs.setConfig({
             paapi: {
               enabled: true,
               defaultForSlots: 1  
               gpt: { 
                 configWithTargeting: true
                }, 
               bidders: ['ix', /* any other bidders */],
           });
        });

      For more information about the configurations, see Prebid’s Protected Audience API (PAAPI) for GPT Module documentation. For examples on bid requests and responses that include the Protected Audience API fields, see Examples of OpenRTB bid requests and responses.