This document describes the changes included for Prebid.js version 11.0.
addAdUnits, bidAccepted, and seatNonBid events have been removed.mediaType does not match their request’s mediaTypes are now rejected as invalid.storageControl module now defaults to strict enforcement.customSlotMatching argument; the configuration options bidViewability.customMatchFunction and gptPreAuction.customGptSlotMatching have been removed. The replacement is a single new configuration option customGptSlotMatching.getAdUnitElement, should be used to link an ad unit / bid request / bid response to its DOM element.navigator.doNotTrack) is no longer supported. The getDNT() utility function now always returns false.The following modules have been removed from Prebid.js as part of the 11.0 release:
| Module | Notes |
|---|---|
adpod |
|
categoryTranslation |
Adpod submodule |
dfpAdServerVideo |
Use gamAdServerVideo instead |
dfpAdpod |
Adpod submodule |
dmdIdSystem |
|
express |
|
freeWheelAdserverVideo |
Adpod submodule |
gamAdpod |
Adpod submodule |
intersectionRtdProvider |
|
optableBidAdapter |
No longer useful without PAAPI |
paapi |
|
paapiForGpt |
|
topLevelPaapi |
|
quantcastBidAdapter |
|
quantcastIdSystem |
|
ringieraxelspringerBidAdapter |
The following events have been removed and will no longer trigger callbacks registered with pbjs.onEvent:
addAdUnits: this event carried no information besides the fact that pbjs.addAdUnits was called. auctionInit and beforeRequestBids contain the ad units involved in each auction.bidAccepted: use bidResponse instead.seatNonBid: use pbsAnalytics instead.Bids that declare a mediaType not present in their ad unit’s mediaTypes are now rejected as invalid. This validation can be turned off by setting auctionOptions.rejectInvalidMediaTypes to false.
Bids that do not declare any mediaType are assumed to be 'banner'; you may require an explicit mediaType with auctionOptions.rejectUnknownMediaTypes. If enabled, bids that do not set mediaType will also be rejected as invalid. For example:
pbjs.setConfig({
auctionOptions: {
rejectInvalidMediaTypes: false, // allow bids on the wrong format
rejectUnknownMediaTypes: true // disallow bids that do not declare their format
}
})
The storageControl module now defaults to strict enforcement; including it will cause undisclosed storage use to fail instead of just logging a warning. You may revert to warning only with
pbjs.setConfig({
storageControl: {
enforcement: 'off'
}
})
customGptSlotMatchingA new configuration option customGptSlotMatching is replacing the following:
customGptSlotMatching configuration option of gptPreAuction;customMatchFunction configuration option of bidViewability.A number of changes were aimed at standardizing two related problems: viewability of an ad unit at the time an auction starts; and viewability of an ad that was rendered on the page.
adUnit.element and getAdUnitElementMany adapters attempt to calculate the position of an ad unit on the page so that they can include that information in their bid request. To facilitate this, 11.0 adds a new element configuration option for ad units that can be used to specify the page element it corresponds to. For example:
pbjs.requestBids({
adUnits: [{
code: 'myAdUnit',
element: document.querySelector('#ad-container')
// ...
}]
})
Adapters can retrieve the element using the getAdUnitElement utility function. If element is not specified for an ad unit it defaults to document.getElementById(adUnit.code).
To determine viewability of an ad rendered on the page, publishers can choose one of two optional modules:
bidViewability only works with GPT ad units, and relies on its impressionViewable events;bidViewabilityIO approximates the same viewability criteria (IAB’s MRC 50%) using IntersectionObserver.When a bid is deemed viewable, both modules now:
bidViewable eventonBidViewable methodevent: 2) event trackers in the bid’s eventtracker array.