Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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: 6 additions & 5 deletions dev-docs/pb10-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
1. A large number of obsolete modules have been removed. Many modules have changed name. See below for the list.
2. The legacy method of native targeting keys, `sendTargetingKeys`, has been removed.
3. `pbadslot` has been removed from the preAuction module. Use `ortb2Imp.ext.gpid` instead.
4. The API methods `getBidResponses` and `getNoBidsForAdUnitCode` now return arrays of bids.
5. TypeScript support has landed and Node.js 20+ is required to build.
6. Using Prebid as an NPM dependency no longer requires using Babel or Prebid's Babel settings.
7. `targetingControls.allBidsCustomTargeting` now defaults to `false`, this prevents custom targeting values from being set for non-winning bids.
8. Storage use disclosures can now be enforced and catalogued
4. The API methods `getBidResponsesForAdUnitCode` and `getNoBidsForAdUnitCode` now return arrays of bids.
5. The API methods `getBidResponses` and `getNoBids` now return an object with an array of bids for each ad unit.
6. TypeScript support has landed and Node.js 20+ is required to build.
7. Using Prebid as an NPM dependency no longer requires using Babel or Prebid's Babel settings.
8. `targetingControls.allBidsCustomTargeting` now defaults to `false`, this prevents custom targeting values from being set for non-winning bids.
9. Storage use disclosures can now be enforced and catalogued

## Removed Modules

Expand All @@ -32,7 +33,7 @@
{: .table .table-bordered .table-striped }

| Module | Replacement |
|:-----------------------------|:-------------------------|

Check failure on line 36 in dev-docs/pb10-notes.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Table column style

dev-docs/pb10-notes.md:36:59 MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md060.md

Check failure on line 36 in dev-docs/pb10-notes.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Table column style

dev-docs/pb10-notes.md:36:32 MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md060.md

Check failure on line 36 in dev-docs/pb10-notes.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Table column style

dev-docs/pb10-notes.md:36:32 MD060/table-column-style Table column style [Table pipe is missing space to the left for style "compact"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md060.md

Check failure on line 36 in dev-docs/pb10-notes.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Table column style

dev-docs/pb10-notes.md:36:1 MD060/table-column-style Table column style [Table pipe is missing space to the right for style "compact"] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md060.md
| dfpAdServerVideo | gamAdServerVideo |
| dfpAdPod | gamAdPod |
| telariaBidAdapter | |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
layout: api_prebidjs
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the adServers.dfp.xxx is still present in V10 and higher, an alternative would be to have 2 versions of the file.

  • The old dfp file, with a warning at the top
  • The new file

For now, I went for the least amount of work approach and only kept the .gam. version in the docs

title: pbjs.adServers.dfp.buildAdpodVideoUrl(options) <span style="color:red" markdown="1">[Alpha]</span>
description: adServers.dfp.buildAdpodVideoUrl API
title: pbjs.adServers.gam.buildAdpodVideoUrl(options) <span style="color:red" markdown="1">[Alpha]</span>
description: adServers.gam.buildAdpodVideoUrl API
sidebarType: 1
---


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

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.

#### Argument Reference

Check failure on line 14 in dev-docs/publisher-api-reference/adServers.gam.buildAdpodVideoUrl.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Heading levels should only increment by one level at a time

dev-docs/publisher-api-reference/adServers.gam.buildAdpodVideoUrl.md:14 MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h4] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md001.md

##### The `options` object

Expand Down Expand Up @@ -42,7 +42,7 @@

pbjs.requestBids({
bidsBackHandler: function(bids) {
pbjs.adServers.dfp. buildAdpodVideoUrl({
pbjs.adServers.gam. buildAdpodVideoUrl({
codes: ['sample-code'],
params: {
iu: '/123456/testing/prebid.org/adunit1',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
layout: api_prebidjs
title: pbjs.adServers.dfp.buildVideoUrl(options)
description: adServers.dfp.buildVideoUrl API
title: pbjs.adServers.gam.buildVideoUrl(options)
description: adServers.gam.buildVideoUrl API
sidebarType: 1
---


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

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

#### Argument Reference

Check failure on line 14 in dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Heading levels should only increment by one level at a time

dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.md:14 MD001/heading-increment Heading levels should only increment by one level at a time [Expected: h2; Actual: h4] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md001.md

##### The `options` object

Expand Down Expand Up @@ -46,7 +46,7 @@
```javascript
pbjs.requestBids({
bidsBackHandler: function(bids) {
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
adUnit: videoAdUnit,
params: {
iu: '/19968336/prebid_cache_video_adunit',
Expand All @@ -72,7 +72,7 @@
+ '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=https://www.example.com'
+ '&cust_params=section%3Dblog%26anotherKey%3DanotherValue';

var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
adUnit: videoAdUnit,
url: adserverTag
});
Expand Down
23 changes: 5 additions & 18 deletions dev-docs/publisher-api-reference/getBidResponses.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This function returns the bid responses at the given moment.

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

**Returns**: `object` - map | object that contains the bidResponses.
**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.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we want to keep the "For backwards compatibility, ..." sentence in here.

I added it because otherwise people might inspect what they get from this method, and discover that it is not in sync with the docs / wonder why there is an additional .bids property present on the array.


**Returned Object Params**:

Expand All @@ -36,7 +36,6 @@ This function returns the bid responses at the given moment.
| `adserverTargeting` | Object | Contains all the adserver targeting parameters | `{ "hb_bidder": "appnexus", "hb_adid": "7a53a9d3" }` |
| `native` | Object | Contains native key value pairs. | `{ "title": "", "body": "" }` |
| `status` | String | Status of the bid. Possible values: targetingSet, rendered | `"targetingSet"` |
| `statusMessage` | String | The bid's status message | "Bid returned empty or error response" or "Bid available" |
| `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` |

<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
Expand All @@ -54,13 +53,11 @@ This function returns the bid responses at the given moment.

```json
{
"/9968336/header-bid-tag-0": {
"bids": [
"/9968336/header-bid-tag-0": [
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't really saw a way to include the .bids property that we have for backwards compatibility here while keeping things readable.
So I just went for the array.

{
"bidderCode": "appnexus",
"width": 300,
"height": 250,
"statusMessage": "Bid available",
"adId": "7a53a9d3",
"creative_id": 29681110,
"cpm": 0.5,
Expand All @@ -81,7 +78,6 @@ This function returns the bid responses at the given moment.
"bidderCode": "pubmatic",
"width": "300",
"height": "250",
"statusMessage": "Bid available",
"adId": "1139e34e14",
"adSlot": "39620189@300x250",
"cpm": 1,
Expand All @@ -105,7 +101,6 @@ This function returns the bid responses at the given moment.
"bidderCode": "rubicon",
"width": "300",
"height": "250",
"statusMessage": "Bid available",
"adId": "130d3b0d9b",
"cpm": 0.795995,
"ad": "<scri...pt>",
Expand All @@ -124,15 +119,12 @@ This function returns the bid responses at the given moment.
"hb_pb": "0.50"
}
}
]
},
"/9968336/header-bid-tag1": {
"bids": [
],
"/9968336/header-bid-tag1": [
{
"bidderCode": "casale",
"width": 0,
"height": 0,
"statusMessage": "Bid returned empty or error response",
"adId": "108c0ba49d",
"requestTimestamp": 1444844944130,
"responseTimestamp": 1444844944223,
Expand All @@ -145,7 +137,6 @@ This function returns the bid responses at the given moment.
"bidderCode": "openx",
"width": "728",
"height": "90",
"statusMessage": "Bid available",
"adId": "14d7f9208f",
"ad_id": "537161420",
"cpm": 1.717,
Expand All @@ -164,7 +155,6 @@ This function returns the bid responses at the given moment.
}
}
]
}
}
```

Expand All @@ -188,8 +178,7 @@ This function returns the bid responses at the given moment.

```json
{
"div-banner-outstream-native" : {
"bids" : [
"div-banner-outstream-native" : [
{
"pbMg" : "10.00",
"pbLg" : "5.00",
Expand Down Expand Up @@ -250,12 +239,10 @@ This function returns the bid responses at the given moment.
"ttl" : 300,
"status" : "targetingSet",
"height" : 0,
"statusMessage" : "Bid available",
"cpm" : 10,
"currency" : "USD"
}
]
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

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

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

{: .table .table-bordered .table-striped }
| Param | Scope | Type | Description |

Check failure on line 15 in dev-docs/publisher-api-reference/getBidResponsesForAdUnitCode.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Tables should be surrounded by blank lines

dev-docs/publisher-api-reference/getBidResponsesForAdUnitCode.md:15 MD058/blanks-around-tables Tables should be surrounded by blank lines [Context: "| Param | Scope | Type | Descr..."] https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md058.md
| --- | --- | --- | --- |
| adUnitCode | Required | `String` | adUnitCode |
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ sidebarType: 1
---

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

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