-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dailymotion Bid Adaptor: initial release #5091
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cf02545
Dailymotion Bid Adaptor: initial release
f178b49
.md file lint issue resolved
Aditi0101 fce9ec3
Merge pull request #3 from dailymotion-oss/feat/dailymotion-adaptor
sebmil-daily 3fec553
Dailymotion Bid Adaptor: add documentation for video metadata support
f383359
Merge branch 'prebid:master' into master
kvnsw 279f5be
feat(LEO-528): Allow multiple IAB categories in video metadata
sebmil-daily ec14d31
Merge branch 'prebid:master' into master
kvnsw d52ee71
Dailymotion bid adapter: Clarify the video metadata to provide in eac…
sebmil-daily 33991e3
Merge pull request #6 from dailymotion-oss/LEO-528_fix_metadata_doc
sebmil-daily 95082b4
Dailymotion bid adapter: Move API key to bid params
sebmil-daily 666411b
Merge branch 'prebid:master' into master
kvnsw 4a344f2
Merge branch 'prebid:master' into master
kvnsw ff5108d
Dailymotion Bid Adaptor: update docs for ortb2 & app & livestream sup…
ce0d356
Dailymotion Bid Adaptor: add gpp support
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
--- | ||
layout: bidder | ||
title: Dailymotion | ||
description: Dailymotion Prebid Bidder Adapter | ||
pbjs: true | ||
pbs: false | ||
biddercode: dailymotion | ||
media_types: video | ||
gvl_id: 573 | ||
tcfeu_supported: true | ||
usp_supported: true | ||
coppa_supported: true | ||
gpp_supported: true | ||
deals_supported: true | ||
floors_supported: true | ||
sidebarType: 1 | ||
safeframes_ok: true | ||
ortb_blocking_supported: false | ||
--- | ||
|
||
### Registration | ||
|
||
To use the adapter with any non-test request, you first need to ask an API key from Dailymotion. Please contact us through <[email protected]> . | ||
|
||
This API key will ensure proper identification of your inventory and allow you to get real bids. | ||
|
||
# Configuration options | ||
|
||
Before calling this adapter, you need to at least set a video adUnit in an instream context and the API key in the bid parameters: | ||
|
||
```javascript | ||
const adUnits = [ | ||
{ | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'fake_api_key' | ||
}, | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
context: 'instream', | ||
}, | ||
}, | ||
} | ||
]; | ||
``` | ||
|
||
`apiKey` is your publisher API key. For testing purpose, you can use "dailymotion-testing". | ||
|
||
# Test Parameters | ||
|
||
By setting the following bid parameters, you'll get a constant response to any request, to validate your adapter integration: | ||
|
||
```javascript | ||
const adUnits = [ | ||
{ | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'dailymotion-testing' | ||
}, | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
context: 'instream', | ||
}, | ||
}, | ||
} | ||
]; | ||
``` | ||
|
||
Please note that failing to set these will result in the adapter not bidding at all. | ||
|
||
# Sample video AdUnit | ||
|
||
To allow better targeting, you should provide as much context about the video as possible. | ||
There are three 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 = [ | ||
{ | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'dailymotion-testing' | ||
} | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
api: [2, 7], | ||
context: 'instream', | ||
startdelay: 0, | ||
w: 1280, | ||
h: 720, | ||
xid: 'x123456' // Dailymotion infrastructure unique video ID | ||
}, | ||
} | ||
} | ||
]; | ||
``` | ||
|
||
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 = [ | ||
{ | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'dailymotion-testing', | ||
video: { | ||
description: 'overriden video description' | ||
} | ||
} | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
api: [2, 7], | ||
context: 'instream', | ||
description: 'this is a video description', | ||
duration: 556, | ||
iabcat1: ['IAB-2'], | ||
iabcat2: ['6', '17'], | ||
id: '54321', | ||
lang: 'FR', | ||
livestream: 0, | ||
private: false, | ||
startdelay: 0, | ||
tags: 'tag_1,tag_2,tag_3', | ||
title: 'test video', | ||
topics: 'topic_1, topic_2', | ||
w: 1280, | ||
h: 720, | ||
}, | ||
} | ||
} | ||
]; | ||
``` | ||
|
||
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 | ||
* `iabcat1` - List of IAB category IDs from the [1.0 taxonomy](https://github.com/InteractiveAdvertisingBureau/Taxonomies/blob/main/Content%20Taxonomies/Content%20Taxonomy%201.0.tsv) | ||
* `iabcat2` - List of IAB category IDs from the [2.0 taxonomy](https://github.com/InteractiveAdvertisingBureau/Taxonomies/blob/main/Content%20Taxonomies/Content%20Taxonomy%202.0.tsv) and above | ||
* `id` - Video unique ID in host video infrastructure | ||
* `lang` - ISO 639-1 code for main language used in the video | ||
* `livestream` - 0 = not live, 1 = content is live | ||
* `private` - True if video is not publicly available | ||
* `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) | ||
|
||
If you already specify [First-Party data](https://docs.prebid.org/features/firstPartyData.html) through the `ortb2` object when calling [`pbjs.requestBids(requestObj)`](https://docs.prebid.org/dev-docs/publisher-api-reference/requestBids.html), we will fallback to those values when possible. See the mapping below. | ||
|
||
| From ortb2 | Metadata fields | | ||
|---------------------------------------------------------------------|-----------------| | ||
| `ortb2.site.content.data` where `ext.segtax` is `4` | `iabcat1` | | ||
| `ortb2.site.content.data` where `ext.segtax` is `5`, `6` or `7` | `iabcat2` | | ||
| `ortb2.site.content.id` | `id` | | ||
| `ortb2.site.content.language` | `lang` | | ||
| `ortb2.site.content.livestream` | `livestream` | | ||
| `ortb2.site.content.keywords` | `tags` | | ||
| `ortb2.site.content.title` | `title` | |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice! You made video and safe-frames work 😍