Video Solutions line items and creatives

Companion ads for video and audio

Use companion ads to complement your main video or audio master ad. Serve companion creatives by configuring your line item, site, and player. #companion #master

Jump to: Companion creative types | configurations | GPT methods

Companion ads allow you to serve ads to display ad slots at the same time as those served to a video or audio player. They always rely on the master ad to serve.

  • VAST creatives can include up to 6 corresponding display ads
  • Labels can prevent ads from competing advertisers from serving at the same time
  • Ability to backfill from the publisher's network if the VAST response contains fewer companion ads than there are defined display slots on the page

An example of a companion adWhen a master ad automatically plays, companion ads load immediately when it starts, so the two load simultaneously. When a master ad requires user initiation, such as click-to-play, a non-companion ad could load in the companion ad slot before the master ad is clicked. When it's clicked to play, the companion ad then replaces the non-companion ad.

The fluid size companion uses the same percentage of space regardless of screen size. This allows the companion ad to fill the entire screen.

developer documentation The IMA SDK supports fluid companions. See the HTML5, iOS, and Android guides.
  • Responsive ads are not supported for video companion ads
  • Google DAI has support for companion ads only on HTML5 and with the Ads API
  • The IMA SDK does not support click-to-call functionality for video companion ads

Available companion creative types

If your VAST creatives include companion creatives, you can use any of the following:

1 Native formats are supported on reservations and Programmatic Guaranteed campaigns with publisher provided creative source when using native styles as the delivery method.

2 Formats with native video enabled cannot be used as companions.

Companion ad configurations

To serve companion creatives, your line item, site, and player must be configured correctly.

  • When you add a line item, you should set the expected creatives to the size of the master video or audio ad, and include the sizes for your companion ads. Then, when you traffic a video or audio creative, you can include the companions in the sizes you've allowed.
  • Display ad slots should be defined using GPT tags that specify how companion ads should behave.
  • A player using the IMA SDK should set companion sizes into the ciu_szs parameter on the request.
  • If your player is an iframe, you need to include a GPT proxy script in your HTML.

You can find implementation details about how to use companion ads with Google Publisher Tags. If you are not using the GPT library, your developers may be able to implement support for companions using the ad API, but the content shown below focuses on GPT features.

GPT methods that support companion ads

GPT javascript Example code in the <head> of a web page


The companionAds() service declares that an ad slot may load with a display ad, but it should defer to the companion if one is available with the VAST ad which serves in a player on the same page.

  [300, 250], 'div1')


The setRefreshUnfilledSlots() method with a param of true will ask for companion slots that have not been filled to be automatically backfilled.



The enableVideoAds() method ensures that both the GPT call and the IMA SDK ad calls will use the same correlator.

This allows competitive exclusions to work across the video and display ads.



Optional for "auto-play" video and audio.

The method can prevent the scenario in which a display ad loads to the ad unit, but is displayed for only a few seconds before the companion ad is delivered.

Compare this with click-to-play ads, where it's not necessary to deactivate the initial load because the display ad should load and show until the user clicks to play, thus loading the companion.



Sample GPT code including companion display ads

The full <head> of a page might look like this:

<script type='text/javascript'>
   window.googletag = window.googletag || {cmd: []};
   (function() {
      var gads = document.createElement('script');
      gads.async = true; gads.type = 'text/javascript';
      gads.src = '';
      var node = document.getElementsByTagName('script')[0];
      node.parentNode.insertBefore(gads, node); })();

<script type='text/javascript'>
   googletag.cmd.push(function() {
     //  set with actual ad units and sizes for your website
     googletag.defineSlot('/12345/path/to/adunit', [300, 250], 'div1').addService(googletag.companionAds()).addService(googletag.pubads());
    googletag.defineSlot('/12345/path/to/adunit', [160, 600], 'div2').addService(googletag.companionAds()).addService(googletag.pubads()); 
    googletag.defineSlot('/12345/path/to/adunit', [728, 90], 'div3').addService(googletag.companionAds()).addService(googletag.pubads());

     //  only necessary on auto‑play video pages

While the <body> code might look like this:

<div id='div1' style='width:300px; min-height:250px;'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('ad-div-1'); });

<div id='div2' style='width:160px; min-height:600px;'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('ad-div-2'); });

<div id='div3' style='width:728px; min-height:90px;'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('ad-div-3'); });
The min-height property is preferred over the use of the height property to reserve the minimum space on the page for the ad slot, while still allowing for a larger ad to serve.

Was this helpful?

How can we improve it?
Clear search
Close search
Google apps
Main menu
Search Help Center