Show Outstream Video Ads
Unlike instream video ads, which require you to have your own video inventory, Outstream video ads can be shown on any web page, even pages that only have text content.
This page has information you’ll need to set up Prebid.js to show outstream video.
Other than using a slightly different ad unit in your Prebid code on the page, you shouldn’t have to make any major engineering changes from a standard Prebid setup.
There should be no changes required on the ad ops side, since the outstream units use the standard Prebid creative, line item targeting setup, etc.
Note that you have the option to show outstream ads with or without an ad server. For more information, see the instructions below.
- Option 1. With an ad server
- Option 2. Without an Ad Server
- Working Examples
- Related Topics
- Demand from a bidder adapter that supports the
"video-outstream"media type, and returns a renderer for outstream video in its bid response
- For more technical information about renderers, see the pull request adding the ‘Renderer’ type
Option 1. With an ad server
This section will take you through the code you need to write to show outstream video ads using Prebid.js.
Step 1. Set up outstream video slot sizes
In your standard Prebid preamble in the header, configure slot sizes to suit your page layout and/or the available demand for those sizes.
Step 2. Set up your ad units with the outstream video media type
Still in the header, set up your ad units with the
video-outstream media type.
As far as what fields are supported in the
video object, that will depend on the rendering options supported by your preferred bidder adaptor(s). For more information, see Bidders’ Params.
Step 3. Show ads on the page as normal
In the body of the page, insert your ads as usual:
Option 2. Without an Ad Server
You can show outstream video ads directly from a demand partner without going through an ad server.
In this section we’ll explain the setup at a high level. For a live example showing all the details, see Outstream without an Ad Server.
Step 1. Set up ad units with the outstream video media type
Set up your video ad units with the outstream video media type as shown below. Note that the
code in your video ad unit must match a div ID in your page’s body where the ad will be inserted.
Step 2. Request bids, and render the returned ad in a callback
In the Prebid.js event queue, you’ll need to add a function that:
- Adds your video ad units
- Requests bids, adding a callback that:
- Gets the targeting for your ad unit
- Renders the ad
For more information, see the API documentation for:
Below, find links to end-to-end “working examples” demonstrating Prebid Outstream: