forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Yieldlab Bid Adapter: add support for native mediatype (prebid#7609)
* YL-3989: Accept NATIVE yieldprobe response (#2) * YL-3989: Accept NATIVE response * Fix: 'utils' is not defined no-undef * trigger GitHub actions * Add multi-format example to the Yieldlab bidder documentation * Reformat code * Fix: Object doesn't support 'find' Object doesn't support property or method 'find' in IE 11 * trigger GitHub actions * Chore:Replace `filter` by `find` from ..array/find.js * Fix typo Co-authored-by: Christoph <[email protected]>
- Loading branch information
Showing
3 changed files
with
213 additions
and
58 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
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 |
---|---|---|
|
@@ -11,53 +11,96 @@ Maintainer: [email protected] | |
Module that connects to Yieldlab's demand sources | ||
|
||
# Test Parameters | ||
|
||
```javascript | ||
const adUnits = [ | ||
{ | ||
code: 'banner', | ||
sizes: [ [ 728, 90 ] ], | ||
bids: [{ | ||
bidder: 'yieldlab', | ||
params: { | ||
adslotId: '5220336', | ||
supplyId: '1381604', | ||
targeting: { | ||
key1: 'value1', | ||
key2: 'value2' | ||
}, | ||
extId: 'abc', | ||
iabContent: { | ||
id: 'some_id', | ||
episode: '1', | ||
title: 'some title', | ||
series: 'some series', | ||
season: 's1', | ||
artist: 'John Doe', | ||
genre: 'some genre', | ||
isrc: 'CC-XXX-YY-NNNNN', | ||
url: 'http://foo_url.de', | ||
cat: [ 'IAB1-1', 'IAB1-2', 'IAB2-10' ], | ||
context: '7', | ||
keywords: ['k1', 'k2'], | ||
live: '0' | ||
} | ||
} | ||
}] | ||
}, | ||
{ | ||
code: 'video', | ||
sizes: [ [ 640, 480 ] ], | ||
mediaTypes: { | ||
video: { | ||
context: 'instream' // or 'outstream' | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'yieldlab', | ||
params: { | ||
adslotId: '5220339', | ||
supplyId: '1381604' | ||
} | ||
}] | ||
}, | ||
{ | ||
code: 'native', | ||
mediaTypes: { | ||
native: { | ||
// native config | ||
} | ||
}, | ||
bids: [{ | ||
bidder: 'yieldlab', | ||
params: { | ||
adslotId: '5220339', | ||
supplyId: '1381604' | ||
} | ||
}] | ||
} | ||
]; | ||
``` | ||
var adUnits = [ | ||
{ | ||
code: "banner", | ||
sizes: [[728, 90]], | ||
bids: [{ | ||
bidder: "yieldlab", | ||
params: { | ||
adslotId: "5220336", | ||
supplyId: "1381604", | ||
targeting: { | ||
key1: "value1", | ||
key2: "value2" | ||
}, | ||
extId: "abc", | ||
iabContent: { | ||
id: "some_id", | ||
episode: "1", | ||
title: "some title", | ||
series: "some series", | ||
season: "s1", | ||
artist: "John Doe", | ||
genre: "some genre", | ||
isrc: "CC-XXX-YY-NNNNN", | ||
url: "http://foo_url.de", | ||
cat: ["IAB1-1", "IAB1-2", "IAB2-10"], | ||
context: "7", | ||
keywords: ["k1", "k2"], | ||
live: "0" | ||
} | ||
} | ||
}] | ||
}, { | ||
code: "video", | ||
sizes: [[640, 480]], | ||
mediaTypes: { | ||
video: { | ||
context: "instream" // or "outstream" | ||
} | ||
}, | ||
bids: [{ | ||
bidder: "yieldlab", | ||
params: { | ||
adslotId: "5220339", | ||
supplyId: "1381604" | ||
} | ||
}] | ||
} | ||
]; | ||
|
||
# Multi-Format Setup | ||
|
||
A general overview of how to set up multi-format ads can be found in the offical Prebid.js docs. See: [show multi-format ads](https://docs.prebid.org/dev-docs/show-multi-format-ads.html) | ||
|
||
When setting up multi-format ads with Yieldlab make sure to always add at least one eligible Adslot per given media type in the ad unit configuration. | ||
|
||
```javascript | ||
const adUnit = { | ||
code: 'multi-format-adslot', | ||
mediaTypes: { | ||
banner: { | ||
sizes: [ [ 728, 90 ] ] | ||
}, | ||
native: { | ||
// native config | ||
} | ||
}, | ||
bids: [ | ||
// banner Adslot | ||
{ bidder: 'yieldlab', params: { adslotId: '1234', supplyId: '42' } }, | ||
// native Adslot | ||
{ bidder: 'yieldlab', params: { adslotId: '2345', supplyId: '42' } } | ||
] | ||
}; | ||
``` |
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