You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev-docs/publisher-api-reference/adServers.dfp.buildVideoUrl.md
+2-75Lines changed: 2 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,80 +5,7 @@ description: adServers.dfp.buildVideoUrl API
5
5
sidebarType: 1
6
6
---
7
7
8
+
See [adServers.gam.buildVideoUrl](/dev-docs/publisher-api-reference/adServers.gam.buildVideoUrl.html).
8
9
9
10
{: .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.
|`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.
|`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?'
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.**
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.
|`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.
|`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?'
0 commit comments