How to customize request with the “ads_params” parameter

Thanks to the Dailymotion Player, Publishers disposing of applicable consent or other legal basis for end-users’ data processing can retrieve valuable information about their specific environment, such as Player size, URL referrer, as well as information about the content and device. All this and much more can be passed dynamically to their VAST tag. In addition, if they want to retrieve more detailed information about their ads to better track and target their end-users, we recommend using the “ads_ params” variable. Here’s how to implement it.
There are several ways you can implement the “ads_params” parameter: Data API, SDKs (JavaScript, Android, and iOS), iFrame, or MRSS feed.
Using Dailymotion’s Data API
To use this method, you need to retrieve an API Key with the “can-manage-ads” role attached.
- Go to our API Explorer: https://developers.dailymotion.com/tools/
- Authenticate using the right application (API Key)
- Click on POST /video/{id} from the video tab
- Fill the advertising_custom_target parameter field using this syntax: test1/tes2/test3
- Click on the Test button

Using Dailymotion’s SDKs
When you load a video with one of our SDKs, the “ads_params” can be added as an optional parameter along with the video ID:
Javascript SDK
player.load(' x5s90td’, {
autoplay: true,
start: 30,
‘ads_params’: ’helloworld’
})
iOS SDK
let payloadParameters = [ “ads_params”:”premium”]
let data = try! JSONSerialization.data(withJSONObject: payloadParameters, options: [])
let payload = String(data, encoding: .utf8)!
PlayerViewController.load(videoId: “x5s90td’”, payload: payload)
Android SDK
Map<String, String> playerParams = new HashMap<>();
playerParams.put(“ads_params”, ”helloworld”);
mVideoView.load(“x5s90td’”, playerParams);
VAST tag:
http://pubads.g.doubleclick.net/gampad/live/ads?sz=320x180|640x360|400x300|468x60|640x480&iu=/XXXX/DESKTOPtest//Home//PrerollVideo&impl=s& gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=http://test.com/12345& description_url=news.dailymotion.com&correlator=6503902658&cust_params=helloworld
Querying String within the Iframe src
You can use the following example to pass several values in the same query string:
<iframe id =”player” frameborder =”0” allowfullscreen=”true” title=”dailymotion video player” width=”100%” height=”100%” src=”https://www.dailymotion.com/embed/video/x5s90td?ads_params=blue/red/white&api=postmessage&autoplay=true&id=player&origin=http://test.com”></iframe>
VAST tag:
http://pubads.g.doubleclick.net/gampad/live/ads?sz=320x180|640x360|400x300|468x60|640x480&iu=/XXXX/DESKTOPtest//Home//PrerollVideo&impl=s& gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=http://test.com/12345& description_url=news.dailymotion.com&correlator=6503902658¶m1=blue¶m2=red¶m3=white
Through the MRSS Feed
In order to add the “ads_params” while uploading through the MRSS feed, you will need to add a tag, as shown below:
<title>Ad_Params</title>
<description>Sample description</description>
<adparam>helloworld</adparam>
<media:content url=http://dailymotion.com”...>