Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions dev-docs/modules/bidViewable.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: page_v2
page_type: module
title: Module - Bid Viewability - GAM
description: Triggers a BID_VIEWABLE event when a rendered bid is viewable according to Active View criteria
description: Triggers a 'bidViewable' event when a rendered bid is viewable according to Active View criteria
module_code : bidViewability
display_name : Bid Viewability - GAM
enable_download : true
Expand All @@ -18,7 +18,7 @@ sidebarType : 1

## Overview

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.
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.

Notes:

Expand Down Expand Up @@ -48,19 +48,14 @@ The default logic used to find a matching Prebid.js bid for a GPT slot is
| `bidViewability` | Required | Object | Configuration object |
| `bidViewability.enabled` | Required | Boolean | when set to true, the module will emit BID_VIEWABLE when applicable. Default: `false` |
| `bidViewability.firePixels` | Optional | Boolean | when set to true, will fire the urls mentioned in `bid.vurls` which should be array of URLs. Default: `false` |
| `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. |

## Example of setting module config

```javascript
pbjs.setConfig({
bidViewability: {
enabled: true,
firePixels: true,
customMatchFunction: function(bid, slot){
console.log('using custom match function....');
return bid.adUnitCode === slot.getAdUnitPath();
}
firePixels: true
}
});
```
Expand Down
4 changes: 2 additions & 2 deletions dev-docs/modules/bidViewableIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: page_v2
page_type: module
title: Module - Bid Viewability - Ad Server Independent
description: Triggers a BID_VIEWABLE event when a rendered bid is viewable according to an approximation of IAB viewability criteria
description: Triggers a `bidViewable` event when a rendered bid is viewable according to an approximation of IAB viewability criteria
module_code : bidViewabilityIO
display_name : Bid Viewability - Ad Server Independent
enable_download : true
Expand All @@ -17,7 +17,7 @@ sidebarType : 1

## Overview

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.
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.

Notes:

Expand Down
106 changes: 106 additions & 0 deletions dev-docs/pb11-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
layout: page_v2
title: Prebid.js 11.0 Release Notes & Publisher API Changes
description: Description of the breaking changes included for Prebid.js 11.0
sidebarType: 1
---

# Prebid.js 11.0 Adapter Interface and Publisher API Changes

{:.no_toc}

This document describes the changes included for Prebid.js version 11.0.

* TOC
{:toc}

## Publisher Summary

1. A number of obsolete modules have been removed (see list below).
2. Adpod is no longer supported.
3. PAAPI is no longer supported.
4. The `addAdUnits`, `bidAccepted`, and `seatNonBid` events have been removed.
5. The `storageControl` module now defaults to strict enforcement.
6. The way viewability is calculated and signaled has been overhauled.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. mediatypes filtering
  2. gptpreauc slot matching unified with viewability


<a id="removed-modules"></a>

## Removed Modules

The following modules have been removed from Prebid.js as part of the 11.0 release:

{: .table .table-bordered .table-striped }

| Module | Notes |
|:--------------------------------|:-------------------------------|
| `adpod` | |
| `categoryTranslation` | |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adpod submodule

| `dfpAdServerVideo` | Use `gamAdServerVideo` instead |
| `dfpAdpod` | |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adpod submodule

| `dmdIdSystem` | |
| `express` | |
| `freeWheelAdserverVideo` | |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adpod submodule

| `gamAdpod` | |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adpod submodule

| `intersectionRtdProvider` | |
| `optableBidAdapter` | |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note was only for paapi

| `paapi` | |
| `paapiForGpt` | |
| `topLevelPaapi` | |
| `quantcastBidAdapter` | |
| `quantcastIdSystem` | |
| `ringieraxelspringerBidAdapter` | |

## Removed events

The following events have been removed and will no longer trigger callbacks registered with [pbjs.onEvent](/dev-docs/publisher-api-reference/onEvent.html):

* `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.

## Strict storageControl enforcement

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

```javascript
pbjs.setConfig({
storageControl: {
enforcement: 'off'
}
})
```

<a id="viewability-overhaul"><a>

## Viewability overhaul

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 `getAdUnitElement`

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:

```javascript
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)`.

### Viewability after rendering

To determine viewability of an ad rendered on the page, publishers can choose one of two optional modules:

* [`bidViewability`](/dev-docs/modules/bidViewable.md) only works with GPT ad units, and relies on its `impressionViewable` events;
* [`bidViewabilityIO`](/dev-docs/modules/bidViewableIO.md) approximates the same viewability criteria (IAB's MRC 50%) using [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).

When a bid is deemed viewable, both modules now:

* fire a `bidViewable` event
* run the relevant adapter's `onBidViewable` method
* trigger "viewable-mrc50" (`event: 2`) event trackers in the bid's `eventtracker` array.
8 changes: 4 additions & 4 deletions dev-docs/publisher-api-reference/getEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ The available events are:
| beforeRequestBids | Bids are about to be requested from adapters (added in 3.x) | Array of adunits in the auction |
| beforeBidderHttp | bidder network request is about be triggered | Array of Bid request objects |
| bidRequested | A bid was requested from a specific bidder | Bid request object |
| bidResponse | A bid response has arrived | Bid response object |
| bidResponse | A bid response has been added to an auction | Bid response object |
| 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) } |
| seatNonBid | DEPRECATED - use pbsAnalytics instead. Prebid Server has returned nonbid information. Must be enabled in s2sConfig.extPrebid | None |
| seatNonBid | Removed in 11.0 - use `pbsAnalytics` instead. Prebid Server has returned nonbid information. Must be enabled in s2sConfig.extPrebid | None |
| bidRejected | A bid was rejected | Bid response object |
| bidAdjustment | A bid was adjusted | Bid response object |
| bidWon | A bid has won | Bid response object |
| bidTimeout | A bid timed out | Array of objects with timed out bids |
| setTargeting | Targeting has been set | Hash of targeting values |
| 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`. |
| addAdUnits | Ad units have been added to the auction | None |
| addAdUnits | Removed in 11.0 - use `auctionInit` instead. Ad units have been added to the auction. Removed in 11.0. | None |
| adRenderFailed| Ad rendering failed | Object containing 'reason' and 'message' |
| 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.|
| auctionDebug | An error was logged to the console | Object containing 'type' and 'arguments' |
| bidderDone | A bidder has signaled they are done responding | Bid request object |
| bidderError | A bidder responded with an error | Object with the XMLHttpRequest error and the bid request object `{ error, bidderRequest }` |
| tcf2Enforcement | There was a TCF2 enforcement action taken | `{ storageBlocked: ['moduleA', 'moduleB'], biddersBlocked: ['moduleB'], analyticsBlocked: ['moduleC'] }` |
| bidAccepted | A bid was accepted and is about to be added to auction | Bid response object |
| bidAccepted | Removed in 11.0 - use `bidResponse` instead. A bid was accepted and is about to be added to auction | Bid response object |
| browserIntervention | The browser reported an intervention affecting a rendered creative (e.g., heavy-ad unload). | `{ bid, adId, intervention }` |

The example below shows how these events can be used.
Expand Down
Loading