In prebid.js, How do I set floor price for each bidder while sending request?

1.3k Views Asked by At

In DFP I'm able to set line item and key value pair to target bidders and price. In prebid.js how do I send floor price dynamically to each bidders while sending request?

I have searched in prebid site's and got one function pbjs.adserverTargeting() which returns following details during response:

{ "hb_bidder": "appnexus", "hb_adid": "7a53a9d3", "hb_pb: 1.0" }

Here hb_pb means floor price? If yes how can I sent those details during request?

3

There are 3 best solutions below

0
On

hb_pb means Header Bidding Price Bucket which is different from Price Floor. A price floor is the lowest CPM price a bid will need to meet for each Prebid auction. It is a way of preventing low bids from winning your impressions. It also helps filter cheap ads that may be malicious in nature since bad actors don't spend too much on ads.

There are 2 ways o set a price floor.

  1. From your ad server - If you use GAM as your ad server, you can do this by going into inventory/pricing rules/New unified price rules. The rest is self-explanatory. You can set a price floor for the device, placement, or bidder.

  2. From the bidder's dashboard - Most bidders let you set a price floor from the dashboard. Those who don't can usually do it for you if you reach out to them.

0
On

As far as I know, it depends on the bidders you're working with. Because there are some bidders who don't allow the passing of floor price in the parameters.

If your bidder partners support floor price, then the bidder parameter consists of "bidFloor" i.e. that represents the floor value. Some of the bidders pass floor price via "floorPriceMap"

hb_pb is just a bidder-key that is used to target the line items in the Google Ad Manager. It doesn't mean floor price. If you've integrated Prebid without any header bidding service provider, you can get it from the bidder partners. In case, if you have a provider, then they provide this data which has to be used in the "Targeting section" under Line items settings in Google Ad Manager.

floors: {
                   currency: 'USD',
                   schema: {
                       fields: [ 'mediaType' ]
                   },
                   values: [
                       {key: 'banner', floor: 1.10},
                       {key: 'video', floor: 2.00}
                   ]
               },

If the ad slots are controlled by Google Publisher Tags, then you can take a hint from the following code:

pbjs.setConfig({
    floors: {
        data: {
            currency: 'USD',
            schema: {
                fields: [ 'gptSlot', 'mediaType' ]
            },
            values: [
                {key: '/1111/homepage/top-rect|banner', floor: 0.80},
                {key: '/1111/homepage/top-rect|video', floor: 1.20},
                {key: '/1111/homepage/left-nav|banner', floor: 0.90},
                ...
                {key: '/1111/tech/left-nav|banner', floor: 1.50}
            ],
            default: 0.75
        }
    }
});

Also, you can delay the auction for some time to receive optimal floor price for specific pages or ad units if you're working with a third-party floor provider:

pbjs.setConfig({
    floors: {
        auctionDelay: 100,   // in milliseconds
        endpoint: {
            url: 'https://floorprovider.com/a1001-mysite.json',
            method: 'GET'
        },
        data: {     // default if endpoint doesn't return in time
            currency: 'USD',
            schema: {
                fields: [ 'mediaType' ]
            },
            values: [
                {key: 'banner', floor: 0.80},
                {key: 'video', floor: 1.20}
            ]
        }
    }
});

0
On

pbjs.adserverTargeting() returns the ad server targeting constructed corresponding to the bids received from the exchanges.

According to the prebid docs only certain bidders allow for sending floor prices through their params, like for example rubicon(http://prebid.org/dev-docs/bidders.html#rubicon) which has an optional param "floor" where you can set the floor price.