-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dailymotion bid adapter: add ortb converter and floor price support
- Loading branch information
Showing
1 changed file
with
113 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -71,6 +71,117 @@ pbjs.setConfig({ | |
}); | ||
``` | ||
|
||
#### Price floor | ||
|
||
The price floor can be set at the ad unit level, for example : | ||
|
||
```javascript | ||
const adUnits = [{ | ||
floors: { | ||
currency: 'USD', | ||
schema: { | ||
fields: [ 'mediaType', 'size' ] | ||
}, | ||
values: { | ||
'video|300x250': 2.22, | ||
'video|*': 1 | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'dailymotion-testing', | ||
} | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
playerSize: [300, 250], | ||
context: 'instream', | ||
}, | ||
} | ||
}]; | ||
|
||
// Do not forget to set an empty object for "floors" to active the price floor module | ||
pbjs.setConfig({floors: {}}); | ||
``` | ||
|
||
The following request will be sent to Dailymotion Prebid Service : | ||
|
||
```javascript | ||
{ | ||
"pbv": "9.23.0-pre", | ||
"ortb": { | ||
"imp": [ | ||
{ | ||
... | ||
"bidfloor": 2.22, | ||
"bidfloorcur": "USD" | ||
} | ||
], | ||
} | ||
... | ||
} | ||
``` | ||
|
||
|
||
Check failure on line 127 in dev-docs/bidders/dailymotion.md
|
||
|
||
Check failure on line 128 in dev-docs/bidders/dailymotion.md
|
||
Or the price floor can be set at the package level, for example : | ||
|
||
```javascript | ||
const adUnits = [ | ||
{ | ||
bids: [{ | ||
bidder: 'dailymotion', | ||
params: { | ||
apiKey: 'dailymotion-testing', | ||
} | ||
}], | ||
code: 'test-ad-unit', | ||
mediaTypes: { | ||
video: { | ||
playerSize: [1280,720], | ||
context: 'instream', | ||
}, | ||
} | ||
} | ||
]; | ||
|
||
pbjs.setConfig({ | ||
floors: { | ||
data: { | ||
currency: 'USD', | ||
schema: { | ||
fields: [ 'mediaType', 'size' ] | ||
}, | ||
values: { | ||
'video|300x250': 2.22, | ||
'video|*': 1 | ||
} | ||
} | ||
} | ||
}) | ||
``` | ||
|
||
This will send the following bid floor in the request to Daiymotion Prebid Service : | ||
```javascript | ||
Check failure on line 167 in dev-docs/bidders/dailymotion.md
|
||
{ | ||
"pbv": "9.23.0-pre", | ||
"ortb": { | ||
"imp": [ | ||
{ | ||
... | ||
"bidfloor": 1, | ||
"bidfloorcur": "USD" | ||
} | ||
], | ||
... | ||
} | ||
} | ||
``` | ||
|
||
You can also set dynamic floors, for more informations : https://docs.prebid.org/dev-docs/modules/floors.html#bid-adapter-interface | ||
Check failure on line 183 in dev-docs/bidders/dailymotion.md
|
||
|
||
### Test Parameters | ||
|
||
By setting the following bid parameters, you'll get a constant response to any request, to validate your adapter integration: | ||
|
@@ -175,7 +286,7 @@ const adUnits = [ | |
maxduration: 30, | ||
playbackmethod: [3], | ||
plcmt: 1, | ||
protocols: [7, 8, 11, 12, 13, 14] | ||
protocols: [7, 8, 11, 12, 13, 14], | ||
startdelay: 0, | ||
w: 1280, | ||
h: 720, | ||
|
@@ -220,8 +331,4 @@ If you already specify [First-Party data](https://docs.prebid.org/features/first | |
| `ortb2.site.content.keywords` | `tags` | | ||
| `ortb2.site.content.title` | `title` | | ||
| `ortb2.site.content.url` | `url` | | ||
| `ortb2.app.bundle` | N/A | | ||
| `ortb2.app.storeurl` | N/A | | ||
| `ortb2.device.lmt` | N/A | | ||
| `ortb2.device.ifa` | N/A | | ||
| `ortb2.device.ext.atts` | N/A | | ||
| `ortb2.*` | N/A | |