Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview: Below is information pertaining to how IRIS.TV’s Contextual Video Marketplace integrates publishers can integrate with the IRIS.TV Context Script. The Context Script gives publishers you the ability to retrieve contextual information for a given video asset. This If you are a publisher and oversee your ad operations and tech stack, this is meant to be used as a part of your existing ad workflow to send contextual data through your ad server. This documentation will walk through how to add the Context Script and workflows for adding the contextual targeting data to your ad tags.

See example implementation page here: https://ovp.iris.tv/demos/context/iris-context-api.html

...

Excerpt
  • A feed with video URLs needs to be provided for IRIS.TV to import and add context contextual data to assets. These Video asset URLs need to link to either MP4 or m3u8 files.

  • An ad tag that can be appended with context category information within the “cust_params” fieldiris_context custom key-value pair.

  • Ad targeting on the context category iris_context key-value pair needs to be set up through the ad server, supply side, and demand side.

Please speak to your IRIS.TV representative for details on these requirements.

...

  • client_token: Authentication string associated with each client. This will be provided by IRIS.TV once the content feed is imported.

  • platform_id: The reference ID for the video asset from the publisher’s CMS.

...

  1. IRIS.TV Context Script is loaded with the page.

  2. The Context Script is initialized.

  3. Call the Context Script with the platform_id for the video asset that is about to play to receive the videos asset’s contextual segments.

  4. Add the contextual segments to the pre-roll ad tag.

This process should be repeated as you iterate through the video playlist.

Excerpt

Installing the Script

NOTE: The script should be loaded as a high priority to ensure you can receive context information for the pre-roll of the initial videoasset.

An example of adding the script to your page HTML:

Code Block
languagehtml
<script src=”https://ovp.iris.tv/libs/context/iris-context.min.js” type=”text/javascript”></script>

If you do not want to load the script as a high-priority, there is an event that you can listen to at the global changes to ensure that the context methods are available. An example of setting up that event listener:

Code Block
window.addEventListener(‘IrisContextAPI’, function() {
    // window.IrisContextAPI is ready to be used
});

Initializing the Script

  • To initialize the script, provide your client token to the IrisContextAPI Object

Code Block
languagejs
   var IrisContext = window.IrisContextAPI({
      client_token: '<your client token here>'
   });

...

Once the script is initialized, you can send in a video an asset ID to receive the context segment on the video. These methods are:

  • getContext – requests the context information for the video asset ID.

  • getVideoInfo – requests context category information for the video ID.

...

Parameter for get_context methods:

  • platform_id: the CMS reference ID of the video. Required.

Please confirm with your IRIS.TV representative

  • Where the context field should be added within the ad tag (i.e. in the “cust_params” field in a DFP tag).

...

To retrieve the context use the following method:

...

Code Block
{
  platform_id: '6026440620001',
  context: ["e883d22ce29c85f9e910281d2a410c5bad77a098"segment_1", "segment_2"]
} 

After the Integration is Complete

Once the integration is complete and you’re receiving contextual segments, move on to Activating Contextual Data in order to add the data into your existing ad workflow.