Supply targeting parameters to your stream

Supplying any of the following targeting parameters is optional.

When you create or configure a content source for video on demand (VOD) or set up a live stream for DAI, you need to specify a default video ad tag. All DAI streams use that ad tag and its parameters by default. If you want your player to request something unique for a given stream, these options are available to you.

Override the default ad tag

When your video player requests a stream, the default ad tag is used exactly as you have specified it in the interface. However, you have the ability to override certain parameters of that tag in your stream request. These are the only parameters that can be overridden.

Parameter Description Example value
iu

Current ad unit. Follow the format:

/network_id/directory/ad_unit

iu=/6062/videodemo
cust_params

Key-value pairs that should be used for Ad Manager campaign targeting. Some platforms require URL encoding.

Examples with multiple key-value pairs, such as:

  • section=sports 
  • page=baseball,tennis

SSB streams
Encode and concatenate the entire cust_params value, but don't double-encode anything.

cust_params=section
%3Dsports%26page
%3Dbaseball%2Ctennis

HTML5, Chromecast, and Roku 
Encode the values only.

streamRequest.adTagParameters = {
  "cust_params":      "section=sports&
  multi=baseball%2Ctennis"};

iOS, tvOS, and Android
Don't encode anything.

request.adTagParameters = @{
  @"cust_params" : @"section=sports&
  multi=baseball,tennis"};

sz

Overrides the sz parameter from your default ad tag allowing you to change dynamically for different devices.

Do not include the "v" after the size.

400x300
tfcd

Tag a request for child-directed treatment. Learn more

http://pubads.g.doubleclick.net/
gampad/ad?tfcd=1&
iu=/12345/adunit...

description_url

The value should describe the video playing on the page. Usually, it's the page that houses the video player, but could also be a page with text that describes the video.

You must always url-encode description_url on SSB streams and when using these SDKs: 
HTML5, Roku.

You should send non-encoded description_url values from 
iOS, tvOS, and Android apps.

This field is required if you use Ad Exchange. Learn more

URL-encoded example:
http%3A%2F%2Fwww.sample.com
%2Fgolf.html

Non-encoded example:
http://www.sample.com/golf.html

ppid The Publisher Provided Identifier (PPID) allows publishers to send an identifier for use in frequency capping, audience segmentation and targeting, sequential ad rotation and other audience-based ad delivery controls across devices. Learn more 12JD92JD8078S8J29SDOAKC0EF230337
ciu_szs

Comma-separated list of companion ad sizes.

Companion ads are only supported with DAI when you use the HTML5 SDK.

728x90,300x250
mpt

Indicates the name of the partner player. This would mostly be used by partners like JWPlayer, Brightcove, Ooyala that are integrating with the SDK.

mpt=JWPlayer
mpv

Indicates the version of the partner player. This should only be set if mpt is also set, and represents the version of the partners player that is integrating with the SDK.

mpv=2.1
ptpl The ad break template ID.

You can find this ID in the Ad Manager URL when viewing the settings for the break template in the Ad Manager interface. It appears as the value for the break_template_id parameter.

ptpl=1234
ptpln The ad break template name. This corresponds to the "Name" field in Ad Manager, not the diplay name.

ptpln=my_break_template
npa The personalization setting for ad requests. You should specify the parameter early in the tag to avoid any risk of truncation.

Specify npa=1 to mark the ad request as non-personalized. Omission of the parameter defaults to personalized ads.

http://pubads.g.doubleclick.net/
gampad/ad?iu=/12345/adunit&
sz=728x90&npa=1&c=12345
rdid
idtype
is_lat
With native applications (not on web or mobile web), the SDK passes resettable device identifiers for user targeting into your stream requests with the parameters for rdid, idtype, and is_lat. On SSB streams, you must pass these as explicit parameters, just as you would on a client-side Video Solutions ad request. Learn more See detailed examples of resettable device identifiers.
vconp Indicates whether the player intends to continuously play the content videos one after another, similar to a TV broadcast.

Possible values are 2 if continuous play is ON, and 1 if OFF.

This parameter should be left unset if it is unknown.

Continuous play ON:
vconp=2

Continuous play OFF:
vconp=1

vpa Indicates whether the ad starts through autoplay or click.

Possible values are click if the page waits for a user action or auto if the video plays automatically.

This parameter should be left unset if it is unknown.

Autoplay:
vpa=auto

Click:
vpa=click

vpmute Indicates whether the ad playback starts while the video player is muted.

Possible values are 1 for muted, and 0 for unmuted.

This parameter should be left unset if it is unknown.

Muted:
vpmute=1

Unmuted:
vpmute=0

Override the default ad tag using the IMA SDK

When a video player requests a DAI stream using the IMA SDK, it can pass in a field called "adTagParameters". This dictionary-like structure can be set with key/value pairs where the keys may be the Ad Manager ad tag parameters which are listed in the table above.

You can customize your stream and pass in parameters which are not related to the Ad Manager ad request using this same structure. Learn how to request specific stream variants and how to set up an ad holiday.

The implementation of the adTagParameters field is slightly different depending on the specific programming language or platform. See the iOS, Android, tvOS, Chromecast, HTML5 development documentation or additional documentation in the DAI player and app development guide.

Set adTagParameters through the SDK


When you set cust_params or description_url through the SDK, on iOS, tvOS, and Android apps, you should not url-encode the strings. You can pass the cust_params through as a single string that concatenates the key/value pairs with a "&".

For example, if you wanted to set cust_params to the value of sport=football&city=newyork:

The adTagParams structure using non-encoded values would be:

{
  "tfcd": 1,
  "iu": "/987654321/path/to/adunit",
  "cust_params": "sport=football&city=newyork",
  "description_url": "http://www.sample.com/golf.html",
  "ppid": "12JD92JD8078S8J29SDOAKC0EF230337"
}

The adTagParams structure using encoded values (for HTML5 or Roku stream requests) would be:

{
  "tfcd": 1,
  "iu": "/987654321/path/to/adunit",
  "cust_params": "sport%3Dfootball%26city%3Dnewyork",
  "description_url": "http%3A%2F%2Fwww.sample.com%2Fgolf.html",
  "ppid": "12JD92JD8078S8J29SDOAKC0EF230337"
}

Override the default ad tag using SSB

The following are examples of modifying an SSB default VOD ad tag. Overwritten parameters passed by the player or app are shown in bold.

Video on demand examples

  Example
Base VOD stream URL http://dai.google.com/ondemand/hls/content/
<contentid>/vid/<vid>/master.m3u8
  (with an ad unit specified) http://dai.google.com/ondemand/hls/content/
<contentid>/vid/<vid>/master.m3u8?iu=/9876/
path/to/adunit
  (with overridden
key/values)
http://dai.google.com/ondemand/hls/content/<contentid>/vid/
<vid>/master.m3u8?cust_params=sport%3Dfootball%26section
%3Dblog%26anotherKey%3Dvalue1%2Cvalue2
  (with a declaration of
child-directed content)
http://dai.google.com/ondemand/hls/content/<contentid>/vid/
<vid>/master.m3u8?tfcd=1 
  (with an over-ridden ad unit AND key/values
AND a custom description_url
AND a declaration of child-directed content)
http://dai.google.com/ondemand/hls/content/<contentid>/vid/
<vid>/master.m3u8?iu=/9876/path/to/adunit
&cust_params=sport%3Dfootball%26section
%3Dblog%26anotherKey%3Dvalue1%2Cvalue2
&description_url=https://mysite.com/description.html
&tfcd=1
 

Live linear stream examples

  Example
Base live linear stream URL https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8
  (with an ad unit specified) https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8
?iu=/9876/path/to/adunit
  (with over-ridden key/values) https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8
?cust_params=sport%3Dfootball%26section
%3Dblog%26anotherKey%3Dvalue1%2Cvalue2
  (with a declaration of
child-directed content)
https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8
?tfcd=1
  (with an overridden ad unit AND key/values
AND a custom description_url
AND a declaration of child-directed content)
https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8
?iu=/9876/path/to/adunit
&cust_params=sport%3Dfootball%26section
%3Dblog%26anotherKey%3Dvalue1%2Cvalue2
&description_url=https://mysite.com/description.html
&tfcd=1
Was this helpful?
How can we improve it?