Skip to content

Commit 9365773

Browse files
Update reference docs with the changes made in V10 (#6506)
* Update pb10-notes.md: refer to correct method * dfp has been renamed to gam * Made distinction between methods returnning an array and methods returning a map * Clarified return type * Clarified return type * Documented null return type * Lint error: add missing space to the left/right of table pipe * Lint error: table should be surrounded by blank lines * Lint error: add missing space to table pipe * Lint error: heading levels should only increment by one level at a time * Restored the level of the headers * dfpAdServerVideo -> gamAdServerVideo * Remove trailing blank lines * Fix header levels * Re-add a single trailing white line
1 parent 27c5a99 commit 9365773

8 files changed

Lines changed: 27 additions & 49 deletions

dev-docs/pb10-notes.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ This document describes the changes included for Prebid.js version 10.0.
1919
1. A large number of obsolete modules have been removed. Many modules have changed name. See below for the list.
2020
2. The legacy method of native targeting keys, `sendTargetingKeys`, has been removed.
2121
3. `pbadslot` has been removed from the preAuction module. Use `ortb2Imp.ext.gpid` instead.
22-
4. The API methods `getBidResponses` and `getNoBidsForAdUnitCode` now return arrays of bids.
23-
5. TypeScript support has landed and Node.js 20+ is required to build.
24-
6. Using Prebid as an NPM dependency no longer requires using Babel or Prebid's Babel settings.
25-
7. `targetingControls.allBidsCustomTargeting` now defaults to `false`, this prevents custom targeting values from being set for non-winning bids.
26-
8. Storage use disclosures can now be enforced and catalogued
22+
4. The API methods `getBidResponsesForAdUnitCode` and `getNoBidsForAdUnitCode` now return arrays of bids.
23+
5. The API methods `getBidResponses` and `getNoBids` now return an object with an array of bids for each ad unit.
24+
6. TypeScript support has landed and Node.js 20+ is required to build.
25+
7. Using Prebid as an NPM dependency no longer requires using Babel or Prebid's Babel settings.
26+
8. `targetingControls.allBidsCustomTargeting` now defaults to `false`, this prevents custom targeting values from being set for non-winning bids.
27+
9. Storage use disclosures can now be enforced and catalogued
2728

2829
## Removed Modules
2930

@@ -32,7 +33,7 @@ The following modules have been removed from Prebid.js as part of the 10.0 relea
3233
{: .table .table-bordered .table-striped }
3334

3435
| Module | Replacement |
35-
|:-----------------------------|:-------------------------|
36+
| :----------------------------- | :------------------------- |
3637
| dfpAdServerVideo | gamAdServerVideo |
3738
| dfpAdPod | gamAdPod |
3839
| telariaBidAdapter | |

dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

dev-docs/publisher-api-reference/adServers.dfp.buildAdpodVideoUrl.md renamed to dev-docs/publisher-api-reference/adServers.gam.buildAdpodVideoUrl.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
22
layout: api_prebidjs
3-
title: pbjs.adServers.dfp.buildAdpodVideoUrl(options) <span style="color:red" markdown="1">[Alpha]</span>
4-
description: adServers.dfp.buildAdpodVideoUrl API
3+
title: pbjs.adServers.gam.buildAdpodVideoUrl(options) <span style="color:red" markdown="1">[Alpha]</span>
4+
description: adServers.gam.buildAdpodVideoUrl API
55
sidebarType: 1
66
---
77

88

99
{: .alert.alert-info :}
10-
The GAM implementation of this function requires including the `dfpAdServerVideo` module in your Prebid.js build.
10+
The GAM implementation of this function requires including the `gamAdServerVideo` module in your Prebid.js build.
1111

1212
This method combines publisher-provided parameters with Prebid.js targeting parameters to build a GAM video ad tag URL that can be used by a video player.
1313

14-
#### Argument Reference
14+
## Argument Reference
1515

16-
##### The `options` object
16+
### The `options` object
1717

1818
{: .table .table-bordered .table-striped }
1919
| Field | Type | Description |
@@ -23,7 +23,7 @@ This method combines publisher-provided parameters with Prebid.js targeting para
2323

2424
{% include alerts/alert_important.html content="For long form Prebid.js will add key-value strings for multiple bids. This prevents retrieving the description url from bid." %}
2525

26-
#### Example
26+
## Example
2727

2828
```JavaScript
2929
pbjs.que.push(function(){
@@ -42,7 +42,7 @@ pbjs.que.push(function(){
4242

4343
pbjs.requestBids({
4444
bidsBackHandler: function(bids) {
45-
pbjs.adServers.dfp. buildAdpodVideoUrl({
45+
pbjs.adServers.gam. buildAdpodVideoUrl({
4646
codes: ['sample-code'],
4747
params: {
4848
iu: '/123456/testing/prebid.org/adunit1',

dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ description: adServers.gam.buildVideoUrl API
55
sidebarType: 1
66
---
77

8-
98
{: .alert.alert-info :}
109
The Google Ad Manager implementation of this function requires including the `gamAdServerVideo` module in your Prebid.js build.
1110

dev-docs/publisher-api-reference/adServers.gam.getVastXml.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ sidebarType: 1
77

88

99
{: .alert.alert-info :}
10-
The Google Ad Manager implementation of this function requires including the dfpAdServerVideo module in your Prebid.js build.
10+
The Google Ad Manager implementation of this function requires including the `gamAdServerVideo` module in your Prebid.js build.
1111

1212
This method extends the behavior of `buildVideoUrl` by not only constructing the Google Ad Manager video ad tag URL, but also fetching and processing the resulting VAST wrapper returned by GAM.
1313

1414
If the `cache.useLocal` flag is set to true, the function scans the received GAM VAST wrapper for the bid’s cached asset URL that corresponds to a locally stored blob in Prebid.js. When such a match is found, it replaces the contents of the GAM wrapper with the contents of the locally cached VAST XML blob, effectively inlining the ad markup instead of referencing it remotely.
1515

16-
#### Argument Reference
16+
## Argument Reference
1717

18-
##### The `options` object
18+
### The `options` object
1919

2020
{: .table .table-bordered .table-striped }
2121
| Field | Type | Description |
@@ -28,7 +28,7 @@ If the `cache.useLocal` flag is set to true, the function scans the received GAM
2828
{: .alert.alert-warning :}
2929
One or both of options.params and options.url is required. In other words, you may pass in one, the other, or both, but not neither.
3030

31-
##### The `options.params` object
31+
### The `options.params` object
3232

3333
{: .table .table-bordered .table-striped }
3434
| Field | Type | Description | Example |
@@ -39,7 +39,7 @@ One or both of options.params and options.url is required. In other words, you m
3939

4040
For more information on any of these params, see [the Google Ad Manager video tag documentation](https://support.google.com/admanager/answer/1068325).
4141

42-
#### Example
42+
## Example
4343

4444
```javascript
4545
pbjs.requestBids({

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

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This function returns the bid responses at the given moment.
1010

1111
**Kind**: static method of `pbjs`.
1212

13-
**Returns**: `object` - map | object that contains the bidResponses.
13+
**Returns**: `object` - map | object that contains for each ad unit the array of bid responses. For backwards compatibility, the arrays expose the array also under the `.bids` property.
1414

1515
**Returned Object Params**:
1616

@@ -36,7 +36,6 @@ This function returns the bid responses at the given moment.
3636
| `adserverTargeting` | Object | Contains all the adserver targeting parameters | `{ "hb_bidder": "appnexus", "hb_adid": "7a53a9d3" }` |
3737
| `native` | Object | Contains native key value pairs. | `{ "title": "", "body": "" }` |
3838
| `status` | String | Status of the bid. Possible values: targetingSet, rendered | `"targetingSet"` |
39-
| `statusMessage` | String | The bid's status message | "Bid returned empty or error response" or "Bid available" |
4039
| `ttl` | Integer | How long (in seconds) this bid is considered valid. See this [FAQ entry]({{site.github.url}}/dev-docs/faq.html#does-prebidjs-cache-bids) for more info. | `300` |
4140
| `meta` | Object | (Optional) Contains additional meta information about the bid. | `{ "advertiserDomains": [ "wherewindsmeetgame.com" ] }` |
4241
| `meta.advertiserDomains` | String[] | (Optional) Array with the advertiser domains | |
@@ -69,13 +68,11 @@ This function returns the bid responses at the given moment.
6968

7069
```json
7170
{
72-
"/9968336/header-bid-tag-0": {
73-
"bids": [
71+
"/9968336/header-bid-tag-0": [
7472
{
7573
"bidderCode": "appnexus",
7674
"width": 300,
7775
"height": 250,
78-
"statusMessage": "Bid available",
7976
"adId": "7a53a9d3",
8077
"creative_id": 29681110,
8178
"cpm": 0.5,
@@ -96,7 +93,6 @@ This function returns the bid responses at the given moment.
9693
"bidderCode": "pubmatic",
9794
"width": "300",
9895
"height": "250",
99-
"statusMessage": "Bid available",
10096
"adId": "1139e34e14",
10197
"adSlot": "39620189@300x250",
10298
"cpm": 1,
@@ -120,7 +116,6 @@ This function returns the bid responses at the given moment.
120116
"bidderCode": "rubicon",
121117
"width": "300",
122118
"height": "250",
123-
"statusMessage": "Bid available",
124119
"adId": "130d3b0d9b",
125120
"cpm": 0.795995,
126121
"ad": "<scri...pt>",
@@ -139,15 +134,12 @@ This function returns the bid responses at the given moment.
139134
"hb_pb": "0.50"
140135
}
141136
}
142-
]
143-
},
144-
"/9968336/header-bid-tag1": {
145-
"bids": [
137+
],
138+
"/9968336/header-bid-tag1": [
146139
{
147140
"bidderCode": "casale",
148141
"width": 0,
149142
"height": 0,
150-
"statusMessage": "Bid returned empty or error response",
151143
"adId": "108c0ba49d",
152144
"requestTimestamp": 1444844944130,
153145
"responseTimestamp": 1444844944223,
@@ -160,7 +152,6 @@ This function returns the bid responses at the given moment.
160152
"bidderCode": "openx",
161153
"width": "728",
162154
"height": "90",
163-
"statusMessage": "Bid available",
164155
"adId": "14d7f9208f",
165156
"ad_id": "537161420",
166157
"cpm": 1.717,
@@ -179,7 +170,6 @@ This function returns the bid responses at the given moment.
179170
}
180171
}
181172
]
182-
}
183173
}
184174
```
185175

@@ -203,8 +193,7 @@ This function returns the bid responses at the given moment.
203193

204194
```json
205195
{
206-
"div-banner-outstream-native" : {
207-
"bids" : [
196+
"div-banner-outstream-native" : [
208197
{
209198
"pbMg" : "10.00",
210199
"pbLg" : "5.00",
@@ -265,12 +254,10 @@ This function returns the bid responses at the given moment.
265254
"ttl" : 300,
266255
"status" : "targetingSet",
267256
"height" : 0,
268-
"statusMessage" : "Bid available",
269257
"cpm" : 10,
270258
"currency" : "USD"
271259
}
272260
]
273-
}
274261
}
275262
```
276263

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ Returns bidResponses for the specified adUnitCode. See full documentation at [pb
99

1010
**Kind**: static method of `pbjs`
1111

12-
**Returns**: `Object` - bidResponse object
12+
**Returns**: `Array` - an array of bid responses. For backwards compatibility, the array exposes the array also under the `.bids` property.
1313

1414
{: .table .table-bordered .table-striped }
15+
1516
| Param | Scope | Type | Description |
1617
| --- | --- | --- | --- |
1718
| adUnitCode | Required | `String` | adUnitCode |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ sidebarType: 1
66
---
77

88
Use this method to retrieve the highest unused bid for the specified adUnit. Unused means not it's not rendered.
9+
Returns `null` when no suitable bid exists.
910

1011
This differs from [`getHighestCpmBids()`](/dev-docs/publisher-api-reference/getHighestCpmBids.html) in that getHighestCpmBids only considers bids for auctions that have completed (and are also unused), this function considers bids for ongoing auctions as well.

0 commit comments

Comments
 (0)