Bidder Settings
The bidderSettings object provides a way to define some behaviors for the platform and specific adapters. The basic structure is a 'standard' section with defaults for all adapters, and then one or more adapter-specific sections that override behavior for that bidder.
pbjs.bidderSettings = {
			    standard: {
			         [...]
			    },
			    ix: {
			        [...]
			    },
			    rubicon: {
			        [...]
			    },
			}
			
Defining bidderSettings is optional; the platform has default values for all of the options. Adapters may specify their own default settings, though this isn't common. Some sample scenarios where publishers may wish to alter the default settings
Bidder Setting Attributes:
  • Accepted Values
    Attribute Scope Version Default Description
    adserverTargeting Standard or Adapter-specific All See below Define which key/value pairs are sent to the ad server.
    bidCpmAdjustment Standard or Adapter-specific All N/A Could, for example, adjust a bidder's gross-price bid to net price.
    sendStandardTargeting Adapter-specific 0.13.0 True If adapter-specific targeting is specified, can be used to suppress the standard targeting for that adapter.
    suppressEmptyKeys Standard or Adapter-specific 0.13.0 False If custom adserverTargeting functions are specified that may generate empty keys, this can be used to suppress them.
adserverTargeting
As described in the AdOps documentation, Prebid has a recommended standard set of ad server targeting that works across bidders. This standard targeting approach is defined in the adserverTargeting attribute in the 'standard' section, but can be overridden per adapter as needed. Both scenarios are described below.
Note that once standard.adserverTargeting is specified, you'll need to fully manage the targeting -- the default `hb_` targeting variables will not be added.
Keyword targeting for all bidders
The below code snippet is the default setting for ad server targeting. For each bidder's bid, Prebid.js will set 6 keys (hb_bidder, hb_adid, hb_pb, hb_size, hb_source, hb_format) with their corresponding values. In addition, video will receive additional keys: hb_cache_id, hb_uuid, and hb_cache_host. The key value pair targeting is applied to the bid's corresponding ad unit. Your ad ops team will have the ad server's line items and creatives to utilize these keys.
If you'd like to customize the key value pairs, you can overwrite the settings as the below example shows. *Note* that once you updated the settings, let your ad ops team know about the change, so they can update the line item targeting accordingly. See the [Ad Ops](/adops/before-you-start.html) documentation for more information.
There's no need to include the following code if you choose to use the *below default setting*.

pbjs.bidderSettings = {
    standard: {
        adserverTargeting: [{
            key: "hb_bidder",
            val: function(bidResponse) {
                return bidResponse.bidderCode;
            }
        }, {
            key: "hb_adid",
            val: function(bidResponse) {
                return bidResponse.adId;
            }
        }, {
            key: "hb_pb",
            val: function(bidResponse) {
                return bidResponse.pbMg;
            }
        }, {
            key: 'hb_size',
            val: function (bidResponse) {
                return bidResponse.size;
            }
        }, {
            key: 'hb_source',
            val: function (bidResponse) {
                return bidResponse.source;
            }
        }, {
            key: 'hb_format',
            val: function (bidResponse) {
                return bidResponse.mediaType;
            }
        }]
    }
}
					
				
Note that the existence of bidderSettings.adserverTargeting.standard will prevent the system from adding the standard display targeting values: hb_bidder, hb_adid, hb_pb, hb_size, hb_source, and hb_format. However, if the mediaType is video and bidderSettings.adserverTargeting.standard does not specify hb_uuid, hb_cache_id, or hb_cache_host, they will be added unless bidderSettings.sendStandardTargeting is set to false.
Keyword targeting for a specific bidder
Let’s say the bidder prefers a separate set of line items. You can overwrite the bidder settings as the below example for AppNexus shows.
Note that the line item setup has to match the targeting change

pbjs.bidderSettings = {
    appnexus: {
      sendStandardTargeting: false,
      adserverTargeting: [
        {
            key: "apn_pbMg",
            val: function(bidResponse) {
                return bidResponse.pbMg;
            }
        }, {
            key: "apn_adId",
            val: function(bidResponse) {
                return bidResponse.adId;
            }
        }
      ]
    }
}
					
				
In other words, the above config sends two pairs of key/value strings targeting for every AppNexus bid and for every ad unit. The 1st pair would be apn_pbMg => the value of bidResponse.pbMg. The second pair would be apn_adId => the value of bidResponse.adId. You can find the documentation of bidResponse object [here](bidders.html#common-bidresponse).
Note that sendStandardTargeting is set to false so that the standard Prebid targeting (hb_bidder, etc.) aren't also sent to the ad server.
Price Buckets
Now let's say you would like to define a bidder-specific price bucket function rather than use the ones available by default in prebid.js. Even the [priceGranularity config](/dev-docs/publisher-api-reference.html#setConfig-Price-Granularity) option applies to all bidders -- with this approach you can overwrite price buckets.
Note: this will only impact the price bucket sent to the ad server for targeting. It won't actually impact the cpm value used for ordering the bids.

pbjs.bidderSettings = {
    standard: {
        [...]
        adserverTargeting: [{
            key: "hb_pb",
            val: function(bidResponse) {
                // define your own function to assign price bucket
                if (cpm < 2)
                    return "pb1"; // all bids less than $2 are assigned to price bucket 'pb1'
                if (cpm < 3)
                    return "pb2"; // all bids less than $3 are assigned to price bucket 'pb2'
                if (cpm < 4)
                    return "pb3"; // all bids less than $4 are assigned to price bucket 'pb3'
                if (cpm < 5)
                    return "pb4"; // all bids less than $5 are assigned to price bucket 'pb4'
                if (cpm < 6)
                    return "pb5"; // all bids less than $6 are assigned to price bucket 'pb5'
                return "pb6"; // all bids $6 and above are assigned to price bucket 'pb6'
            }
        }]
	[...]
    }
}
			
bidCpmAdjustment
Some bidders return gross prices instead of the net prices (what the publisher will actually get paid). For example, a publisher's net price might be 15% below the returned gross price. In this case, the publisher may want to adjust the bidder's returned price to run a true header bidding auction. Otherwise, this bidder's gross price will unfairly win over your other demand sources who report the real price.

pbjs.bidderSettings = {
  standard: { ... }
  aol: {
    bidCpmAdjustment : function(bidCpm, bid){
      // adjust the bid in real time before the auction takes place
      console.log('Bidder is: ' + bid.bidderCode);
      return bidCpm * .85;
    }
  }
};
			
In the above example, the AOL bidder will inherit from "standard" adserverTargeting keys, so that you don't have to define the targeting keywords again.
sendStandardTargeting
This boolean flag minimizes key/value pairs sent to the ad server when adapter-specific targeting is specified. By default, the platform will send both adapter-specific adServerTargeting as well as the standard adServerTargeting.
While sending extra targeting the ad server may not matter, this flag can be used to suppress the standard targeting for adapters that define their own.
See the [example above](#key-targeting-specific-bidder) for example usage.
suppressEmptyKeys
If a custom adServerTargeting function can return an empty value, this boolean flag can be used to avoid sending those empty values to the ad server.
Response
Response Description
{ response: example }
  • param1: string

    String indicating some value that has to be passed as a string type.

  • param2: number

    Number indicating some value that has to be passed as a number type.

    Note: This number should be between 0 and infinity.