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
- Option 3. With a Publisher-defined Renderer
- 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:
Option 3. With a Publisher-defined Renderer
An outstream bid response is accompanied by a video renderer in the form of a URL that points to a script containing the renderer software. This software is used by Prebid.js to load and play the winning outstream bid.
If you would prefer to use a different renderer than the one provided in the bid response, you can specify that renderer on a per-outstream-ad-unit basis. This renderer will be used to load and play the outstream ad, instead of the renderer that is supplied with the bid. If both a publisher-supplied ad unit renderer and a bid renderer are present, the publisher-supplied renderer will be used.
To use a publisher-defined renderer, add a
renderer property to your outstream ad unit as shown below. Other than the ad unit, the rest of the setup will be the same as for Option 1. With an ad server.
Below, find links to end-to-end “working examples” demonstrating Prebid Outstream: