If you’re new to header bidding and Prebid review the following to get a general understanding of Prebid.js.
See Prebid.js Video Overview for a general description and high-level overview of working with video demand in Prebid.js.
Prebid uses FreeWheel for the distrubtion of Creatives
. Refer to Setting Up Prebid video in FreeWheel for an Ad Ops getting started guide.
To implement header bidding for long-form video start by downloading Prebid.js.
Before downloading, select the adapters you want to include. (You can add more adapters later.)
You will need to configure Prebid to ensure competitive separation, the process of preventing two ads from the same industry appearing within an ad pod. After you have instantiated a Prebid instance call the setConfig method and add the following key-values.
pbjs.setConfig({
'adpod': {
'brandCategoryExclusion': true
}
});
As with instream and outstream videos, you must set the video context for long-form ad units. The context setting for long-form video is adpod
. There are also some addtional required and optional parameters (see list below).
As with all ad unit types you must include a list of bidders. The parameters differ depending on which bidder you’re including. For a list of parameters for each bidder, see Bidders’ Params.
var longFormatAdUnit = {
video: {
// required params
context: 'adpod',
playerSize: [640, 480],
adPodDurationSec: 300,
durationRangeSec: [15, 30],
// optional params
requireExactDuration: true,
tvSeriesName: 'TvName',
tvEpisodeName: 'episodeName',
tvSeasonNumber: 3,
tvEpisodeNumber: 6,
contentLength: 300, // time in seconds,
contentMode: 'on-demand'
}
bids: [{
bidder: 'appnexus',
params: {
placementId: 123456789,
}
}]
}
video.context
A string indicating the ad unit type.
video.playerSize
An array of numbers indicating the height and width of the video player size that will be passed to the demand partners.
video.adPodDurationSec
A number indicating how long the ad pod should run.
video.durationRangeSec
A number indicating how long the creatives of an ad pod should run.
video.requireExactDuration
A boolean indicating if the returned creatives running time must match the value of adPodDurationSec
video.tvSeriesName
A string representing the name of the television series the adpod will appear in.
video.tvEpisodeName
A string representing the episode name of the television series the adpod will appear in.
video.tvSeasonNumber
A number representing the season number of the television series the adpod will appear in.
video.tvEpisodeNumber
A number representing the episode number of the television series the adpod will appear in.
video.contentLengthSec
A number representing the length of the content the adpod will appear in.
video.contentMode
A string indicating the type of content being displayed in the video player. There are two options, live
and on-demand
.
If you’re using Prebid Server, you must also include the mediaTypes.video.mimes field, as this is required by OpenRTB.
mediaTypes: { video: { context: 'apod', // or 'instream', 'outstream' playerSize: [640, 480], mimes: ['video/mp4'],
For more on Prebid Server ad unit requirements, see Getting Started with Prebid Server – Video.
After you’ve defined your ad units, you can continue with the rest of your configuration.
See Prebid Video Examples for examples of long-form video ads.