Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New PAAPI module: topLevelPaapi #11379

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Apr 22, 2024

Type of change

  • Feature

Description of change

  • update PAAPI requestedSize handling as described in PAAPI module: fill out auctionSignals.prebid.ortb2Imp.banner better #11189 (comment)
  • introduce a new module, topLevelPaapi, intended for pubs running top level auctions. Example configuration:
    pbjs.setConfig({
      paapi: {
        topLevelSeller: {
           auctionConfig: {
               seller: 'example.seller',
               decisionLogicURL: 'https://example.seller/dl.js',
               // ...
           },
           autorun: true,
           overrideWinner: true
        }
      }
    })
    
  • auctionConfig is reflected by getPAAPIConfig().
  • introduce a new public api, pbjs.getPAAPIBids(), which accepts the same filters as getPAAPIConfig, and returns a promise to a map from ad unit code to paapi auction result (obtained by calling runAdAuction).
    The auction result is an object with the format {adId, adUnitCode, auctionId, width, height, urn, frameConfig} (where urn and frameConfig are mutually exclusive)
  • the adId generated by getPAAPIBids() can be rendered with pbjs.renderAd like "normal" adIds
  • autorun, if true (the default), starts runAdAuction ASAP (currently, that's when the Prebid auction ends)
  • overrideWinner, if true (default is false), makes it so that PAAPI bids are rendered instead of the contextual winner.For example, calling renderAd() or rendering PUC / other creatives in the normal way would check if there's a a PAAPI bid for the ad slot, and if so render that instead.
  • introduce new events paapiRunAuction, paapiBid, paapiNoBid, and paapiError
  • update the top level auction integration example to use the above.

Other information

Closes #11189
Closes: #10690

src/secureCreatives.js Dismissed Show dismissed Hide dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PAAPI module: fill out auctionSignals.prebid.ortb2Imp.banner better Prebid invokes runAdAuction()
5 participants