Skip to content

Commit

Permalink
Merge pull request #11 from dailymotion-oss/LEO-528_fix_metadata_doc
Browse files Browse the repository at this point in the history
Dailymotion bid adapter: Clarify the video metadata to provide in each player context
  • Loading branch information
sebmil-daily authored Mar 27, 2024
2 parents 4b78d35 + 09f8e16 commit 44b88d1
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions modules/dailymotionBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,32 @@ Please note that failing to set these configuration options will result in the a

# Sample video AdUnit

To allow better targeting, you should provide as much context about the video as possible.
There are two ways of doing this depending on if you're using Dailymotion player or a third party one.

If you are using the Dailymotion player, you should only provide the video `xid` in your ad unit, example:

```javascript
const adUnits = [
{
code: 'test-ad-unit',
mediaTypes: {
video: {
context: 'instream',
playerSize: [1280, 720],
api: [2,7],
xid: 'x123456'
},
}
}
];
```

This will automatically fetch the most up-to-date information about the video.
If you provide any other metadata in addition to the `xid`, they will be ignored.

If you are using a third party video player, you should not provide any `xid` and instead fill the following members:

```javascript
const adUnits = [
{
Expand All @@ -66,31 +92,23 @@ const adUnits = [
tags: 'tag_1,tag_2,tag_3',
title: 'test video',
topics: 'topic_1, topic_2',
xid: 'x123456'
},
},
bids: [{
bidder: "dailymotion",
params: {
video: {
description: 'this is a test video description',
duration: 330,
iabcat2: ['6', '17'],
id: '54321',
lang: 'FR',
private: false,
tags: 'tag_1,tag_2,tag_3',
title: 'test video',
topics: 'topic_1, topic_2, topic_3',
xid: 'x123456'
description: 'overriden video description',
duration: 330
}
}
}]
}
];
```

Following video metadata fields can be added in mediaTypes.video or bids.params.video. If a field exists in both places, it will be overridden by bids.params.video.
Each of the following video metadata fields can be added in mediaTypes.video or bids.params.video.
If a field exists in both places, it will be overridden by bids.params.video.

* `description` - Video description
* `duration` - Video duration in seconds
Expand All @@ -101,7 +119,7 @@ Following video metadata fields can be added in mediaTypes.video or bids.params.
* `tags` - Tags for the video, comma separated
* `title` - Video title
* `topics` - Main topics for the video, comma separated
* `xid` - Dailymotion video identifier (only applicable if using the Dailymotion player), allows better targeting
* `xid` - Dailymotion video identifier (only applicable if using the Dailymotion player)

# Integrating the adapter

Expand Down

0 comments on commit 44b88d1

Please sign in to comment.