Companion Ads

To access these features, Upgrade Now
This document applies to users of JW Player Ads. Don't have Ads?  Upgrade Now.

JW Player supports the insertion of companion ads into the page. HTML/IFRAME and GIF/JPG/PNG ads are supported for both VAST and IMA.

In order to render a companion, you must set the id, width and height of the DOM element the companion should be placed into. JW Player will then insert a companion if the ad tag contains one that exactly matches the width and height provided in the configuration. If the dimensions do not match up, JW Player will not display an ad. (which could lead to broken page designs)

We can confirm our companion dimensions by viewing our VAST file itself. In the companion section, we can confirm:

<Companion width="300" height="250">

This means that our tag will attempt to load a companion with a width of 300 and a height of 250. In addition, the div where we'd like to set this up has been given the ID of rectangle. Within our advertising block, we will go ahead and set our companiondiv portion with the aforementioned information:

advertising: {
client: "vast",
tag: "myVast.xml"
    companiondiv: {
        id: "rectangle",
        width: 300,
        height: 250
        }
}

​Example

Here's an example setup using a VAST tag that contains a banner companion ad. Using Google IMA companion ads would be set up in the same way, aside from using the googima client.

 

Note that the companion will remain visible after the linear video ad has ended, until either another companion is loaded or the viewer navigates away from the page.

Did you find this article helpful?

Please log in to rate this article.