Set up PB for JWP mediation (Web Player)
Configure your Player Bidding implementation with JW Player mediation.
Player Bidding (PB) connects your digital video inventory directly to advertising demand sources, increasing competition for your inventory to boost your ad yield. By configuring the advertising
object of the player, you can access the benefits of player bidding. You can use either a cloud-hosted or self-hosted player.
Due to the potential impact on performance and user experience, while the player is waiting for the bidding process to complete, the
playAd()
method is not supported when using Player Bidding.If you have configured advertising settings for your player in your JWP dashboard, changes made to the player's
advertising
object override any dashboard advertising settings. To maintain any dashboard advertising settings, be sure to include all existing dashboard advertising configurations within the advertising object.
If you prefer, you can also set up Player Bidding through your JWP dashboard.
Implementation
Use the following steps and code example to enable Player Bidding:
- Be sure that you have satisfied all the requirements for PB.
- Within
setup()
of an embedded cloud-hosted or self-hosted JWP web player, add anadvertising
object that defines whether IMA or VAST ads will be served.
Be sure to replace
{ID}
with a randomly-generated, eight-character, alpha-numeric value. This enables you to run reports for this advertising setup.
"advertising": { "client": "googima", "adscheduleid": "{id}", }
"advertising": { "client": "vast", "adscheduleid": "{id}", }
- Add the
schedule
object. At the minimum, you must assign an ad tag to thetag
property and assignpre
to theoffset
property.
The ad tag is used as a fallback tag. PB supports configuringoffset
for mid-roll and post-roll breaks. Since the auction happens before video playback begins and bids may not be valid when a mid-roll or post-roll ad break occurs, we recommend configuringoffset
for pre-roll ad breaks.
"schedule": [{ "offset": "pre", "tag": "{fallback_ad_tag_url}" }]
- Add the bids object.
- Within the
bids
object, configure the bidders object for an ad partner. You can combine multiple ad partners into a single array of objects. - Within the
bids
object, configure the settings object. Be sure to define the floor price (floorPriceCents
).
Determining the best floor price depends upon various factors. If you need assistance determining the best floor price, please consult with your JWP representative or SSP partner.
"settings": { "mediationLayerAdServer": "jwp", "floorPriceCents": {floor_price} }
- (Strongly recommended) Within the
settings
object, add configure the consentManagement object to manage EU General Data Protection Regulation (GDPR) and California Consumer Privacy Act (CCPA) settings.
With the GDPR improvements introduced in Prebid.js 4, JWP has updated its Player Bidding product to give you greater control over your GDPR settings. All publishers are expected to have a consent management platform (CMP) and understand how it works. Prebid.js offers some CMP guidance.
"settings": { ... "consentManagement": { "gdpr": { "cmpApi": "iab", "rules": [{ "purpose": "basicAds", "enforcePurpose": true, "enforceVendor": true }], "defaultGdprScope": true, "timeout": 0 // GDPR timeout 0ms }, "usp": { "cmpApi": "iab", "timeout": 0 // US Privacy timeout 0ms } } }
Full code sample
// Instantiate the player
jwplayer("myElement").setup({
// Define the playlist or video.
"playlist": "{playlist_url or video_url}",
"advertising": {
// Define the ad client: googima or vast
"client": "googima",
"adscheduleid": "{id}",
/* Set the ad to play as a preroll.
Define a fallback ad tag.
*/
"schedule": [{
"offset": "pre",
"tag": "{fallback_ad_tag_url}"
}],
"bids": {
// Configure the ad partners
"bidders": [{
"id": "{section_id}",
"name": "MediaGrid",
"pubid": "{publisher_id}"
}, {
"id": "{section_id}",
"name": "EMX",
"pubid": "{publisher_id}"
}],
/* Set the mediation layer.
Define the floor price.
*/
"settings": {
"mediationLayerAdServer": "jwp",
"floorPriceCents": {floor_price},
"consentManagement": {
"gdpr": {
"cmpApi": "iab",
"rules": [{
"purpose": "basicAds",
"enforcePurpose": true,
"enforceVendor": true
}],
"defaultGdprScope": true,
"timeout": 0 // GDPR timeout 0ms
},
"usp": {
"cmpApi": "iab",
"timeout": 0 // US Privacy timeout 0ms
}
}
}
}
}
});
Additional settings
After implementing the basic PB setup, you can customize your implementation with any of these additional properties.
advertising
For explanations of each property listed below, see: advertising.
Property | VAST | IMA |
---|---|---|
autoplayadsmuted | β | β |
bids See: advertising.bids | β | β |
companiondiv See: advertising.companiondiv | β | β |
conditionaladoptout | β | |
creativeTimeout | β | |
forceNonLinearFullSlot | β | |
loadVideoTimeout | β | |
locale | β | |
maxRedirects NOTE: A maximum redirect of 4-8 is recommended for maximum PB yield. | β | |
placement | β | β |
preloadAds | β | β |
requestTimeout | β | β |
rules See: advertising.rules | β | β |
schedule See: advertising.schedule | β | β |
vastLoadTimeout | β | |
vpaidcontrols | β | β |
vpaidmode | β | |
withCredentials | β | β |
advertising.bids
For an explanation of the property listed below, see: advertising.bids.
Property | VAST | IMA |
---|---|---|
bidOnBreaksΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
settings See: advertising.bids.settings | β | β |
advertising.bids.settings
For explanations of each property listed below, see: advertising.bids.settings.
Property | VAST | IMA |
---|---|---|
bidTimeoutΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
floorPriceCurrency | β | β |
advertising.companiondiv
For explanations of each property listed below, see: advertising.companiondiv.
Property | VAST | IMA |
---|---|---|
heightΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
id | β | β |
width | β | β |
advertising.rules
For explanations of each property listed below, see: advertising.rules.
Property | VAST | IMA |
---|---|---|
deferAdsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | |
startOn | β | β |
startOnSeek | β | β |
timeBetweenAds | β | β |
advertising.schedule
For explanations of each property listed below, see: advertising.schedule.
Property | VAST | IMA |
---|---|---|
customParamsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
type | β | β |
autoPause
For explanations of each property listed below, see: autoPause.
Property | VAST | IMA |
---|---|---|
pauseAdsΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
viewability | β | β |
intl.{lang}.advertising
For explanations of each property listed below, see: intl.{lang}.advertising.
Property | VAST | IMA |
---|---|---|
admessageΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β | β | β |
cuetext | β | β |
loadingAd | β | β |
skipmessage | β | |
skiptext | β | Β |
Updated about 1 year ago