As of July 5, 2017 the Flash SDK is deprecated. We recommend using the HTML5 SDK for inline ads with web video content.

Companion Ads

You may want to associate your in-page HTML and Flash ad slots with video or overlay ad slots. This relationship between associated ad slots is referred to as the master/companion relationship. In addition to being used for requesting video and overlay master ads, the IMA SDK can be used to display companion HTML and Flash-in-Flash ads. These ads are displayed within an HTML environment, alongside other Flash content, or within a Flash website.

To use companion ads, you must perform the following steps:

1. Book your Companion Ads

You must first book the companion ads that you want to display with your master ads. Companion ads can be trafficked in DFP. You can serve up to six companion ads per master ad. This technique, when a single buyer controls all ads on the page, is also known as "roadblocking".

2. Request your Companion Ads

By default, companion ads are enabled for each ad request. The Flash SDK allows you to disable companion ads by setting adsRequest.disableCompanionAds to true. This option is not available in the HTML5 SDK.

3. Displaying Companion Ads

There are two ways to render companion ads:

  • Automatically using the Google Publisher Tag (GPT)
    If you are using GPTs to implement your companion ads, they will be displayed automatically as long as there are companion ad slots declared on the HTML page and these ads are registered with the API (i.e. the div ID in the JavaScript and HTML must match). Some benefits of using GPTs are:
    • Companion slot awareness
    • Companion backfill from the publisher's network, if the VAST response contains fewer companion ads than there are defined slots on the HTML page
    • Companion autofill if a video ad is missing
    • Preloaded companion ad slots for click-to-play video players
    • Automated companion rendering, including HTMLResource and iFrameResource

  • Manually using the Ad API.

Send feedback about...

IMA SDK for Flash
Need help? Visit our support page.