This version of Prebid.js brought to you by over 20 members of the developer community. Thank you for supporting open source software.
You can improve performance by loading the Prebid and GPT libraries in parallel. See the example pages for changes to be made to the page to achieve this. (ht to @BartVB for the suggestion).
New Features
- Prebid.org download page Easily customize Prebid.js build http://prebid.org/download.html
- New adapter for Sonobi (contributed by @astudnicky, closes #90)
- New adapter for Brightcom (contributed by @matan-ybrant)
- New adapter for Adequant (contributed by @relegit)
- New API for
pbjs.setPriceGranularity()
adjust price bucket granularity in one line - Alias adapters with config setting Specificy aliases in
package.json
"adapters" - Metadata added "REPO_AND_VERSION" available in
constants.json
to get repo owner, library and version info (contributed by @cliffliang) - Analytics Customization Support for Google Analytics named trackers (contributed by @bborn, closes #291)
- Always send default keys Always use default bid key/value pairs in addition to any customizations (#295)
- Performance Improvements load
prebid
andgpt
in parallel (suggested by @BartVB, closes #276) - Code quality & style reports in terminal (run
gulp quality
checks before opening PRs) - New consolidated library for AOL (contributed by @sneako)
- Multiple size slot support in IndexExchange adapter (contributed by @indexexchange)
New adapter for Sonobi - how to add:
var adUnits = [{
code: '/9968336/header-bid-tag-0',
sizes: [[300, 250], [300, 600]],
bids: [{
bidder: 'sonobi', // New format
params: {
dom_id: 'PER SLOT', // <String> dom Id
ad_unit:'PER SLOT' // <String> ad unit code
}
},
{
bidder: 'sonobi', // Old account format
params: {
dom_id: 'PER SLOT', // <String> dom Id
placement_id:'PER SLOT' // <String> placement Id
}
}]
}];
New adapter for Brightcom - how to add
var adUnits = [
{
code: '/9968336/header-bid-tag-0',
sizes: [[300, 250], [300, 600]],
bids: [
{
bidder: 'brightcom',
params: {
tagId: 12345 // Tag ID supplied by Brightcom - brightcom.com
}
}
]
}
];
New adapter for Adequant - how to add:
var adUnits = [{
code: '/9968336/header-bid-tag-0',
sizes: [[300, 250], [300, 600]],
bids: [{
bidder: 'adequant',
params: {
publisher_id: '1234567', // REQUIRED int or str publisher ID. To get one, register at https://control.adequant.com
bidfloor: 0.01 // OPTIONAL float bid floor in $ CPM
}
}
]}
}];
New API for pbjs.setPriceGranularity()
pbjs.setPriceGranularity
is a Prebid API method to configure which price bucket is used for "hb_pb". The accepted values are, "low", "medium", "high" and "auto", with "medium" being the default. Also introduces the "auto" price bucket which applies a sliding scale to determine granularity as:
cpm | granularity |
---|---|
cpm < 5 | .05 increments |
cpm > 5 and < 10 | .10 increments |
cpm > 10 and < 20 | .50 increments |
cpm > 20 | pb capped at 20 |
Alias adapters with config setting
Adapter aliases can be specified in the "adapters" section of ./package.json
. You can pass an object in the adapters array as shown:
"adapters": [
"triplelift",
"rubicon",
{ "appnexus": {"alias": "brealtime"} }
]
This syntax could also be used to pass additional build-level config to a given adapter, though alias is the only such property read in the adapter loader at the moment.
New Metadata for Github account and version
A new metadata string can be found in constants.json
for "REPO_AND_VERSION" which provides the Github account name that the code was downloaded from (e.g. "prebid") the library ("prebid") and version ("0.8.0"). This can be useful for included in bid requests or for analytics. The returned value is e.g. "prebid_prebid_0.8.0"
.
Analytics Customization
Google Analytics named trackers are now supported. A custom tracker name (or multiple tracker names) can be registerd with GA on your page like so:
ga('create', 'UA-xxxxxxxx-x', 'auto', 'customTrackerName');
And used with prebid by passing that tracker name in the pbjs.enableAnalytics
options:
pbjs.enableAnalytics({
provider: 'ga',
options: {
global: 'ga', // <string> name of GA global. Default is 'ga'
trackerName: 'customTrackerName',
enableDistribution: false, // <bool> enable/disable distribution. Recommend disable to save bandwidth/calls
}
});
Always send default keys
Bidders will always get key value pairs that are set in the default (i.e. hb_pb
, hb_bidder
, hb_adid
, hb_size
) even if using alwaysUseBid=true
. If you choose to use the same key as the default keys, the standard value will be overwritten with the custom value.
Bug fixes in this release
- #267 Fix for
pbjs
not defined error - reported by @dmitriyshashkin - #269 and 272 Fix for Google Analytics not reporting initial events or timeout events (reported by @dmitriyshashkin)
- #254 Fix for Rubicon adapter bug with multiple iframes (reported by @Deimos01 and fixed by @bretg)
- [#245] Use
node 4.x
or greater - [#279] Fix
bids undefined
error (fixed by @steven-hadfield) - Other misc bug fixes (see the full commit log here: 0.7.0...0.8.0)