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.  

Please note: you only need to select one solution that works best for you. Once the setup is done, the values will automatically pass in your VAST tags.

Using Dailymotion’s Data API 

To use this method, you need to retrieve an API Key with the “can-manage-ads” role attached. 

Tips: Select the advertising_custom_target field to get it in the API result

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’ 


let payloadParameters = [ “ads_params”:”premium”] 
let  data = try! 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:|640x360|400x300|468x60|640x480&iu=/XXXX/DESKTOPtest//Home//PrerollVideo&impl=s& gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=

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=””></iframe>

VAST tag:|640x360|400x300|468x60|640x480&iu=/XXXX/DESKTOPtest//Home//PrerollVideo&impl=s& gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=

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:  

<description>Sample description</description> 
<media:content url=”...>

Tips: Offering a customized experience to Publishers is our top priority at Dailymotion. Learn more about our Partner Program by visiting our dedicated website