bythomas09-25-201311:56 AM - edited 11-02-201608:18 AM
Displaying Companion Ads for Google IMA V3
Directions on how to display Companion Ads for assets that have a Google IMA V3 Ad Tag containing Companion Ads.
Windows, Mac OSX, iOS, Android
Using a DoubleClick VAST Tag, the Ooyala Player V3 listens to the WILL_SHOW_COMPANION_ADS event before displaying companion Ads, it is through this event, that users can read the content of the Ad Tag and display on their site as necessary.
For Google IMA V3, a different set up is needed.
HOW TO RESOLVE
You need to lod the following JS code from Google, ideally inside the <head> element of your tag:
In the body of your web page, create the Ooyala Player, create the necessary divs to display the companion ads, and set the following script from Google’s Publisher Tag API:
var adSlot1 = googletag.defineSlot(
'Ad Unit Name',
The Companion Ad data is set in the defineSlot method, which requires 3 parameters:
Ad Unit Name - This information is provided directly to the Google IMA Customer.
Size of the companion ad - This is specified as an array [width, height]
ID of the Div Container - The actual ID of the div element in which you want to load the companion Ad.
Now that we have all the necessary for the companion data to load, we can add and enable the Google Companion Ad services. Then choose to display the Ad by triggering the .display() method, with the id of the div element where we want to display our companion Ads.