Skip to content

Commit f8f618a

Browse files
dgirardipatmmccann
andauthored
prebid 11.0 release notes (#6482)
* prebid 11.0 release notes * lint * updates * lint * removal notes * adapter summary * grammar * Update freeWheelAdserverVideo description * fix .md into .html Updated links in documentation for bidViewability and customMatchFunction to use the correct file extension. * fix customGptSlotMatching name * Add links to Prebid.js release notes --------- Co-authored-by: Patrick McCann <patmmccann@gmail.com>
1 parent 208d422 commit f8f618a

File tree

8 files changed

+168
-16
lines changed

8 files changed

+168
-16
lines changed

dev-docs/modules/bidViewable.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page_v2
33
page_type: module
44
title: Module - Bid Viewability - GAM
5-
description: Triggers a BID_VIEWABLE event when a rendered bid is viewable according to Active View criteria
5+
description: Triggers a 'bidViewable' event when a rendered bid is viewable according to Active View criteria
66
module_code : bidViewability
77
display_name : Bid Viewability - GAM
88
enable_download : true
@@ -18,7 +18,7 @@ sidebarType : 1
1818

1919
## Overview
2020

21-
This optional module will trigger a BID_VIEWABLE event which can be consumed by Analytics adapters. In addition, the winning bidder can implement an `onBidViewable` method to capture this event.
21+
This optional module will trigger a `bidViewable` event which can be consumed by Analytics adapters. In addition, the winning bidder can implement an `onBidViewable` method to capture this event.
2222

2323
Notes:
2424

@@ -48,19 +48,15 @@ The default logic used to find a matching Prebid.js bid for a GPT slot is
4848
| `bidViewability` | Required | Object | Configuration object |
4949
| `bidViewability.enabled` | Required | Boolean | when set to true, the module will emit BID_VIEWABLE when applicable. Default: `false` |
5050
| `bidViewability.firePixels` | Optional | Boolean | when set to true, will fire the urls mentioned in `bid.vurls` which should be array of URLs. Default: `false` |
51-
| `bidViewability.customMatchFunction` | Optional | function(bid, slot) | this function will be used to find the matching winning bid for the GPT slot. See above for the default. |
51+
| `bidViewability.customMatchFunction` | Optional | function(bid, slot) | REMOVED in 11.0; use [customGptSlotMatching](/dev-docs/publisher-api-reference/setConfig.html#customGptSlotMatching) instead. This function will be used to find the matching winning bid for the GPT slot. See above for the default. |
5252

5353
## Example of setting module config
5454

5555
```javascript
5656
pbjs.setConfig({
5757
bidViewability: {
5858
enabled: true,
59-
firePixels: true,
60-
customMatchFunction: function(bid, slot){
61-
console.log('using custom match function....');
62-
return bid.adUnitCode === slot.getAdUnitPath();
63-
}
59+
firePixels: true
6460
}
6561
});
6662
```

dev-docs/modules/bidViewableIO.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: page_v2
33
page_type: module
44
title: Module - Bid Viewability - Ad Server Independent
5-
description: Triggers a BID_VIEWABLE event when a rendered bid is viewable according to an approximation of IAB viewability criteria
5+
description: Triggers a `bidViewable` event when a rendered bid is viewable according to an approximation of IAB viewability criteria
66
module_code : bidViewabilityIO
77
display_name : Bid Viewability - Ad Server Independent
88
enable_download : true
@@ -17,7 +17,7 @@ sidebarType : 1
1717

1818
## Overview
1919

20-
This optional module will trigger a BID_VIEWABLE event which can be consumed by Analytics adapters. In addition, the winning bidder can implement an `onBidViewable` method to capture this event.
20+
This optional module will trigger a `bidViewable` event which can be consumed by Analytics adapters. In addition, the winning bidder can implement an `onBidViewable` method to capture this event.
2121

2222
Notes:
2323

dev-docs/modules/gpt-pre-auction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Optional initialization parameters:
4949
{: .table .table-bordered .table-striped }
5050
| Param | Required? | Type | Description | Example |
5151
| enabled | no | boolean | allows turning off of module. Default value is true | true |
52-
| customGptSlotMatching | no | function | GPT slot matching function should match the customSlotMatching function sent to [setTargetingForGptAsync](/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html) | |
52+
| customGptSlotMatching | no | function | REMOVED in 11.0; use [customGptSlotMatching](/dev-docs/publisher-api-reference/setConfig.html#customGptSlotMatching) instead. GPT slot matching function should match the customSlotMatching function sent to [setTargetingForGptAsync](/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html) | |
5353
| useDefaultPreAuction | no | boolean | (PBJS 6.5+) If true, use default behavior for determining GPID and PbAdSlot. Defaults to false. | true |
5454
| customPreAuction | no | function | (PBJS 6.5+) Custom function for defining the GPID and PbAdSlot. | |
5555
| customPbAdSlot | no | function | Custom PB AdSlot function. (Note, this function will be deprecated in the future.) | |

dev-docs/pb11-notes.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
layout: page_v2
3+
title: Prebid.js 11.0 Release Notes & Publisher API Changes
4+
description: Description of the breaking changes included for Prebid.js 11.0
5+
sidebarType: 1
6+
---
7+
8+
# Prebid.js 11.0 Adapter Interface and Publisher API Changes
9+
10+
{:.no_toc}
11+
12+
This document describes the changes included for Prebid.js version 11.0.
13+
14+
* TOC
15+
{:toc}
16+
17+
## Publisher Summary
18+
19+
1. A number of obsolete modules have been removed (see list below).
20+
2. Adpod is no longer supported.
21+
3. PAAPI is no longer supported.
22+
4. The `addAdUnits`, `bidAccepted`, and `seatNonBid` events have been removed.
23+
5. Bids whose `mediaType` does not match their request's `mediaTypes` are now rejected as invalid.
24+
6. The `storageControl` module now defaults to strict enforcement.
25+
7. [setTargetingForGPTAsync](/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html) no longer takes a `customSlotMatching` argument; the configuration options `bidViewability.customMatchFunction` and `gptPreAuction.customGptSlotMatching` have been removed. The replacement is a single new configuration option `customGptSlotMatching`.
26+
8. The way viewability is calculated and signaled has been overhauled.
27+
28+
## Adapter summary
29+
30+
1. A new utility function, `getAdUnitElement`, should be used to link an ad unit / bid request / bid response to its DOM element.
31+
2. DNT (`navigator.doNotTrack`) is no longer supported. The `getDNT()` utility function now always returns `false`.
32+
3. Typescript is now preferred over Javascript. New modules should provide types for their public interface.
33+
34+
<a id="removed-modules"></a>
35+
36+
## Removed Modules
37+
38+
The following modules have been removed from Prebid.js as part of the 11.0 release:
39+
40+
{: .table .table-bordered .table-striped }
41+
42+
| Module | Notes |
43+
|:--------------------------------|:-------------------------------|
44+
| `adpod` | |
45+
| `categoryTranslation` | Adpod submodule |
46+
| `dfpAdServerVideo` | Use `gamAdServerVideo` instead |
47+
| `dfpAdpod` | Adpod submodule |
48+
| `dmdIdSystem` | |
49+
| `express` | |
50+
| `freeWheelAdserverVideo` | Adpod submodule |
51+
| `gamAdpod` | Adpod submodule |
52+
| `intersectionRtdProvider` | |
53+
| `optableBidAdapter` | No longer useful without PAAPI |
54+
| `paapi` | |
55+
| `paapiForGpt` | |
56+
| `topLevelPaapi` | |
57+
| `quantcastBidAdapter` | |
58+
| `quantcastIdSystem` | |
59+
| `ringieraxelspringerBidAdapter` | |
60+
61+
## Removed events
62+
63+
The following events have been removed and will no longer trigger callbacks registered with [pbjs.onEvent](/dev-docs/publisher-api-reference/onEvent.html):
64+
65+
* `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.
66+
* `bidAccepted`: use `bidResponse` instead.
67+
* `seatNonBid`: use `pbsAnalytics` instead.
68+
69+
## Stricter mediaType enforcement
70+
71+
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`.
72+
73+
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:
74+
75+
```javascript
76+
pbjs.setConfig({
77+
auctionOptions: {
78+
rejectInvalidMediaTypes: false, // allow bids on the wrong format
79+
rejectUnknownMediaTypes: true // disallow bids that do not declare their format
80+
}
81+
})
82+
```
83+
84+
## Strict storageControl enforcement
85+
86+
The [storageControl](/dev-docs/modules/storageControl.html) 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
87+
88+
```javascript
89+
pbjs.setConfig({
90+
storageControl: {
91+
enforcement: 'off'
92+
}
93+
})
94+
```
95+
96+
## `customGptSlotMatching`
97+
98+
A new configuration option `customGptSlotMatching` is replacing the following:
99+
100+
* the second argument of [setTargetingForGPTAsync](/dev-docs/publisher-api-reference/setTargetingForGPTAsync.html);
101+
* the `customGptSlotMatching` configuration option of [gptPreAuction](/dev-docs/modules/gpt-pre-auction.html);
102+
* the `customMatchFunction` configuration option of [bidViewability](/dev-docs/modules/bidViewable.html).
103+
104+
<a id="viewability-overhaul"><a>
105+
106+
## Viewability overhaul
107+
108+
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.
109+
110+
### `adUnit.element` and `getAdUnitElement`
111+
112+
Many 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:
113+
114+
```javascript
115+
pbjs.requestBids({
116+
adUnits: [{
117+
code: 'myAdUnit',
118+
element: document.querySelector('#ad-container')
119+
// ...
120+
}]
121+
})
122+
```
123+
124+
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)`.
125+
126+
### Viewability after rendering
127+
128+
To determine viewability of an ad rendered on the page, publishers can choose one of two optional modules:
129+
130+
* [`bidViewability`](/dev-docs/modules/bidViewable.html) only works with GPT ad units, and relies on its `impressionViewable` events;
131+
* [`bidViewabilityIO`](/dev-docs/modules/bidViewableIO.html) approximates the same viewability criteria (IAB's MRC 50%) using [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
132+
133+
When a bid is deemed viewable, both modules now:
134+
135+
* fire a `bidViewable` event
136+
* run the relevant adapter's `onBidViewable` method
137+
* trigger "viewable-mrc50" (`event: 2`) event trackers in the bid's `eventtracker` array.

dev-docs/publisher-api-reference/getEvents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ The available events are:
3030
| beforeRequestBids | Bids are about to be requested from adapters (added in 3.x) | Array of adunits in the auction |
3131
| beforeBidderHttp | bidder network request is about be triggered | Array of Bid request objects |
3232
| bidRequested | A bid was requested from a specific bidder | Bid request object |
33-
| bidResponse | A bid response has arrived | Bid response object |
33+
| bidResponse | A bid response has been added to an auction | Bid response object |
3434
| pbsAnalytics | Prebid Server has returned extra information for analytics adapters. | { [seatnonbid](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#seat-non-bid), auctionId, [atag](/prebid-server/developers/module-atags.html) } |
35-
| seatNonBid | DEPRECATED - use pbsAnalytics instead. Prebid Server has returned nonbid information. Must be enabled in s2sConfig.extPrebid | None |
35+
| seatNonBid | Removed in 11.0 - use `pbsAnalytics` instead. Prebid Server has returned nonbid information. Must be enabled in s2sConfig.extPrebid | None |
3636
| bidRejected | A bid was rejected | Bid response object |
3737
| bidAdjustment | A bid was adjusted | Bid response object |
3838
| bidWon | A bid has won | Bid response object |
3939
| bidTimeout | A bid timed out | Array of objects with timed out bids |
4040
| setTargeting | Targeting has been set | Hash of targeting values |
4141
| requestBids | Bids have been requested from adapters (i.e. pbjs.requestBids() was called) | The argument passed to [`requestBids`](https://docs.prebid.org/dev-docs/publisher-api-reference/requestBids.html), except that `adUnits` and `adUnitCodes` are always set and reflect the ad units involved in the auction. Event handlers may not modify `adUnitCodes`. |
42-
| addAdUnits | Ad units have been added to the auction | None |
42+
| addAdUnits | Removed in 11.0 - use `auctionInit` instead. Ad units have been added to the auction. Removed in 11.0. | None |
4343
| adRenderFailed| Ad rendering failed | Object containing 'reason' and 'message' |
4444
| adRenderSucceeded | Ad rendering succeeded| Object containing 'doc', 'bid', and 'adId'. 'doc' is the DOM root containing the ad and may be `null` if it was rendered in a cross-origin iframe. This event indicates that the render function did not generate an error, it does not guarantee that tracking for this event has occurred yet.|
4545
| auctionDebug | An error was logged to the console | Object containing 'type' and 'arguments' |
4646
| bidderDone | A bidder has signaled they are done responding | Bid request object |
4747
| bidderError | A bidder responded with an error | Object with the XMLHttpRequest error and the bid request object `{ error, bidderRequest }` |
4848
| tcf2Enforcement | There was a TCF2 enforcement action taken | `{ storageBlocked: ['moduleA', 'moduleB'], biddersBlocked: ['moduleB'], analyticsBlocked: ['moduleC'] }` |
49-
| bidAccepted | A bid was accepted and is about to be added to auction | Bid response object |
49+
| bidAccepted | Removed in 11.0 - use `bidResponse` instead. A bid was accepted and is about to be added to auction | Bid response object |
5050
| browserIntervention | The browser reported an intervention affecting a rendered creative (e.g., heavy-ad unload). | `{ bid, adId, intervention }` |
5151

5252
The example below shows how these events can be used.

dev-docs/publisher-api-reference/setConfig.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,24 @@ pbjs.setConfig({
13171317
{: .alert.alert-warning :}
13181318
In PBJS 4.29 and earlier, don't add the `ortb2` level here -- just `site` directly. Oh, and please upgrade. 4.29 was a long time ago.
13191319

1320+
<a id="customGptSlotMatching"></a>
1321+
1322+
### Custom GPT slot matching
1323+
1324+
By default, Prebid matches ad units to GPT slots by code, i.e. a GPT `slot` corresponds to a Prebid `adUnit` if `slot.getAdUnitPath() === adUnit.code`. You can provide a custom matching function to override this, for example:
1325+
1326+
```javascript
1327+
pbjs.setConfig({
1328+
customGptSlotMatching: function(slot) {
1329+
return function(adUnitCode) {
1330+
return slot.getAdUnitPath() === adUnitCode
1331+
}
1332+
}
1333+
})
1334+
```
1335+
1336+
`customGptSlotMatching` should be a function accepting a single GPT [Slot](https://developers.google.com/publisher-tag/reference#googletag.Slot). It should return another function accepting a single string representing an ad unit code. The inner function should return true if the givne slot matches the given ad unit code.
1337+
13201338
<a name="setConfig-auctionOptions"></a>
13211339

13221340
### Auction Options

dev-docs/publisher-api-reference/setTargetingForGPTAsync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Set query string targeting on GPT ad units after the auction.
1414
| Param | Scope | Type | Description |
1515
| --- | --- | --- | -- |
1616
| [codeArr] | Optional | `array` | an array of adUnitCodes to set targeting for. |
17-
| customSlotMatching | Optional | `function` | gets a GoogleTag slot and returns a filter function for adUnitCode. |
17+
| customSlotMatching | Optional | `function` | REMOVED in 11.0; use [customGptSlotMatching](/dev-docs/publisher-api-reference/setConfig.html#customGptSlotMatching) instead. Gets a GoogleTag slot and returns a filter function for adUnitCode. |
1818

1919
This function matches AdUnits that have returned from the auction to a GPT ad slot and adds the `hb_`
2020
targeting attributes to the slot so they get sent to GAM.

dev-docs/release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This page has links to release notes for each of the projects associated with Pr
1515
## Prebid.js
1616

1717
+ [Release notes on GitHub](https://github.com/prebid/Prebid.js/releases)
18+
+ [Prebid.js 11 Release Notes](/dev-docs/pb11-notes.html)
1819
+ [Prebid.js 10 Release Notes](/dev-docs/pb10-notes.html)
1920
+ [Prebid.js 9 Release Notes](/dev-docs/pb9-notes.html)
2021
+ [Prebid.js 8 Release Notes](/dev-docs/pb8-notes.html)

0 commit comments

Comments
 (0)