Skip to content

Commit 69cb083

Browse files
committed
Update dfp -> gam
1 parent de62968 commit 69cb083

12 files changed

Lines changed: 98 additions & 87 deletions

File tree

_includes/video/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
pbjs.requestBids({
5656
bidsBackHandler: function(bids) {
57-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
57+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
5858
adUnit: videoAdUnit,
5959
params: {
6060
iu: '/19968336/prebid_cache_video_adunit',

assets/js/video/pb-is-jw-01.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pbjs.que.push(function(){
4242

4343
pbjs.requestBids({
4444
bidsBackHandler: function(bids) {
45-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
45+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
4646
adUnit: videoAdUnit,
4747
params: {
4848
iu: '/19968336/prebid_cache_video_adunit',

assets/js/video/pb-ve-jwplayer-platform-h.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function loadVideoData() {
4141

4242
pbjs.requestBids({
4343
bidsBackHandler: function(bids) {
44-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
44+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
4545
adUnit: videoAdUnit,
4646
params: {
4747
iu: '/19968336/prebid_cache_video_adunit',

dev-docs/examples/instream-banner-mix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ function initAdserver(bids) {
187187
}
188188
});
189189

190-
// Build DFP URL with targeting for videoAdUnit
191-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
190+
// Build GAM URL with targeting for videoAdUnit
191+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
192192
adUnit: videoAdUnit,
193193
params: {
194194
iu: '/19968336/prebid_cache_video_adunit',

dev-docs/modules/dfp_video.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ The standard options:
2828

2929
This module exposes the following methods:
3030

31-
- [`pbjs.adServers.gam.buildVideoUrl`](/dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.html)
32-
- [`pbjs.adServers.gam.getVastXml`](/dev-docs/publisher-api-reference/adServers.dfp.getVastXml.html)
31+
- [`pbjs.adServers.gam.buildVideoUrl`](/dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.html)
32+
- [`pbjs.adServers.gam.getVastXml`](/dev-docs/publisher-api-reference/adServers.gam.getVastXml.html)
3333

3434
# Further Reading
3535

dev-docs/modules/konduit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pbjs.que.push(function() {
110110
adUnitCode: videoAdUnit[0].code,
111111
timeout: 1500,
112112
callback: function (error, bids) {
113-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
113+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
114114
...
115115
});
116116

dev-docs/plugins/bc/bc-prebid-plugin-prebid-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ None
325325

326326
Parameters used when using Google Ad Manager as the ad server.
327327

328-
See prebid.org documentation for [buildVideoUrl](/dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.html)
328+
See prebid.org documentation for [buildVideoUrl](/dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.html)
329329

330330
**Acceptable Values:**
331331

dev-docs/plugins/cross-player-prebid-component/cross-player-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ None
209209

210210
Parameters used when using Google Ad Manager (formerly DFP) as the ad server.
211211

212-
See documentation for [buildVideoUrl](/dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.html) for more information.
212+
See documentation for [buildVideoUrl](/dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.html) for more information.
213213

214214
**Acceptable Values:**
215215

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

Lines changed: 2 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -5,80 +5,7 @@ description: adServers.dfp.buildVideoUrl API
55
sidebarType: 1
66
---
77

8+
See [adServers.gam.buildVideoUrl](/dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.html).
89

910
{: .alert.alert-info :}
10-
The Google Ad Manager implementation of this function requires including the `dfpAdServerVideo` module in your Prebid.js build.
11-
12-
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.
13-
14-
#### Argument Reference
15-
16-
##### The `options` object
17-
18-
{: .table .table-bordered .table-striped }
19-
| Field | Type | Description |
20-
|----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
21-
| `adUnit` | object | *Required*. The Prebid ad unit to which the returned URL will map. |
22-
| `params` | object | *Optional*. Querystring parameters that will be used to construct the Google Ad Manager video ad tag URL. Publisher-supplied values will override values set by Prebid.js. See below for fields. |
23-
| `url` | string | *Optional*. The video ad server URL. When given alongside params, the parsed URL will be overwritten with any matching components of params. |
24-
| `bid` | object | *Optional*. The Prebid bid for which targeting will be set. If this is not defined, Prebid will use the bid with the highest CPM for the adUnit. |
25-
26-
{: .alert.alert-warning :}
27-
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.
28-
29-
##### The `options.params` object
30-
31-
{: .table .table-bordered .table-striped }
32-
| Field | Type | Description | Example |
33-
|-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------|
34-
| `iu` | string | *Required*. Google Ad Manager ad unit ID. | `/19968336/prebid_cache_video_adunit` |
35-
| `cust_params` | object | *Optional*. Key-value pairs merged with Prebid's targeting values and sent to Google Ad Manager on the video ad tag URL. | `{section: "blog", anotherKey: "anotherValue"}` |
36-
| `description_url` | string | *Optional*. Describes the video. Required for Ad Exchange. Prebid.js will build this for you unless you pass it explicitly. | `https://www.example.com` |
37-
38-
For more information on any of these params, see [the Google Ad Manager video tag documentation](https://support.google.com/admanager/answer/1068325).
39-
40-
#### Examples
41-
42-
There are several different ways to build up your video URL, as shown in the examples below:
43-
44-
Using `options.params` only:
45-
46-
```javascript
47-
pbjs.requestBids({
48-
bidsBackHandler: function(bids) {
49-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
50-
adUnit: videoAdUnit,
51-
params: {
52-
iu: '/19968336/prebid_cache_video_adunit',
53-
cust_params: {
54-
section: "blog",
55-
anotherKey: "anotherValue"
56-
},
57-
hl: "en",
58-
output: "xml_vast2",
59-
url: "https://www.example.com",
60-
}
61-
});
62-
invokeVideoPlayer(videoUrl);
63-
}
64-
});
65-
```
66-
67-
Using `options.url` only:
68-
69-
```javascript
70-
var adserverTag = 'https://pubads.g.doubleclick.net/gampad/ads?'
71-
+ 'sz=640x480&iu=/19968336/prebid_cache_video_adunit&impl=s&gdfp_req=1'
72-
+ '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=https://www.example.com'
73-
+ '&cust_params=section%3Dblog%26anotherKey%3DanotherValue';
74-
75-
var videoUrl = pbjs.adServers.dfp.buildVideoUrl({
76-
adUnit: videoAdUnit,
77-
url: adserverTag
78-
});
79-
```
80-
81-
<a name="module_pbjs.requestBids"></a>
82-
83-
{: .alert.alert-warning :}
84-
In the event of collisions, querystring values passed via `options.params` take precedence over those passed via `options.url`.
11+
In Prebid 10, the `dfpAdServerVideo` module and the `adServers.dfp.buildVideoUrl` API were renamed to `gamAdServerVideo` and `adServers.gam.buildVideoUrl` respectively.**
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
layout: api_prebidjs
3+
title: pbjs.adServers.dfp.buildVideoUrl(options)
4+
description: adServers.dfp.buildVideoUrl API
5+
sidebarType: 1
6+
---
7+
8+
9+
{: .alert.alert-info :}
10+
The Google Ad Manager implementation of this function requires including the `gamAdServerVideo` module in your Prebid.js build.
11+
12+
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.
13+
14+
#### Argument Reference
15+
16+
##### The `options` object
17+
18+
{: .table .table-bordered .table-striped }
19+
| Field | Type | Description |
20+
|----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
21+
| `adUnit` | object | *Required*. The Prebid ad unit to which the returned URL will map. |
22+
| `params` | object | *Optional*. Querystring parameters that will be used to construct the Google Ad Manager video ad tag URL. Publisher-supplied values will override values set by Prebid.js. See below for fields. |
23+
| `url` | string | *Optional*. The video ad server URL. When given alongside params, the parsed URL will be overwritten with any matching components of params. |
24+
| `bid` | object | *Optional*. The Prebid bid for which targeting will be set. If this is not defined, Prebid will use the bid with the highest CPM for the adUnit. |
25+
26+
{: .alert.alert-warning :}
27+
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.
28+
29+
##### The `options.params` object
30+
31+
{: .table .table-bordered .table-striped }
32+
| Field | Type | Description | Example |
33+
|-------------------+--------+-----------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------|
34+
| `iu` | string | *Required*. Google Ad Manager ad unit ID. | `/19968336/prebid_cache_video_adunit` |
35+
| `cust_params` | object | *Optional*. Key-value pairs merged with Prebid's targeting values and sent to Google Ad Manager on the video ad tag URL. | `{section: "blog", anotherKey: "anotherValue"}` |
36+
| `description_url` | string | *Optional*. Describes the video. Required for Ad Exchange. Prebid.js will build this for you unless you pass it explicitly. | `https://www.example.com` |
37+
38+
For more information on any of these params, see [the Google Ad Manager video tag documentation](https://support.google.com/admanager/answer/1068325).
39+
40+
#### Examples
41+
42+
There are several different ways to build up your video URL, as shown in the examples below:
43+
44+
Using `options.params` only:
45+
46+
```javascript
47+
pbjs.requestBids({
48+
bidsBackHandler: function(bids) {
49+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
50+
adUnit: videoAdUnit,
51+
params: {
52+
iu: '/19968336/prebid_cache_video_adunit',
53+
cust_params: {
54+
section: "blog",
55+
anotherKey: "anotherValue"
56+
},
57+
hl: "en",
58+
output: "xml_vast2",
59+
url: "https://www.example.com",
60+
}
61+
});
62+
invokeVideoPlayer(videoUrl);
63+
}
64+
});
65+
```
66+
67+
Using `options.url` only:
68+
69+
```javascript
70+
var adserverTag = 'https://pubads.g.doubleclick.net/gampad/ads?'
71+
+ 'sz=640x480&iu=/19968336/prebid_cache_video_adunit&impl=s&gdfp_req=1'
72+
+ '&env=vp&output=xml_vast2&unviewed_position_start=1&hl=en&url=https://www.example.com'
73+
+ '&cust_params=section%3Dblog%26anotherKey%3DanotherValue';
74+
75+
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
76+
adUnit: videoAdUnit,
77+
url: adserverTag
78+
});
79+
```
80+
81+
<a name="module_pbjs.requestBids"></a>
82+
83+
{: .alert.alert-warning :}
84+
In the event of collisions, querystring values passed via `options.params` take precedence over those passed via `options.url`.

0 commit comments

Comments
 (0)