how does prebid.js talk with specific DFP Order/Line items meant for hb_pb

236 views Asked by At

I am new to prebid.js and trying to setup the same on my web pages. In DFP, I've created an advertiser specifically for prebid and under it I've created an order with 472 line items each starting from $0.01 upto $20.00 and I've also assigned them hb_pb key value.

My question is when I am configuring the prebid.js code on page, how does the page is able communicate with DFP's specific Order/Line items as I don't see any options to instruct anywhere in prebid.js that it will pass its response through the specific Order/LI's only.

Also, do we have any option to mention Price Granularity in prebid.js code so that prebid.js can act accordingly? I think for Dense PG, I've 472 line items, therefore for PG: HIGH/LOW I think same number of line items can work well ? Or should I create separate orders/line items according to price granularity?

Thanks,

1

There are 1 answers

0
rabsom On

Prebid.js is able to call the right line item because it amends the adcall with specific key values. It is pretty well explained here.Technically, it happens when pbjs.setTargetingForGPTAsync(); is triggered. See here for the basic sample demo.

To simplify :

  1. your page is loading, Google Ad Manager starts its scripts
  2. Google Ad Manager is put on hold by Prebid, that checks if any bid is going to win
  3. if so, Prebid injects key-values on the Google Ad Manage adcalls.
  4. Google Ad Manager receive the adcall with the right price granularity

Regarding your question about price granularity : you can set it up in your Prebid config script thanks to priceGranularity (see here for full reference). No need to create different orders as the price granularity impacts the demand and is done through the keywords logic.