Spotx: Passing Contextual Data

This details how to format the iris_context and iris_id KVPs in the SpotX tag and OpenRTB integrations.

Tag Integration

The tag integration leverages the custom key-value pair formatting to pass in the iris_context and iris_id KVP.  Here's the documentation from SpotX on how to format custom KVPs in the ad tag: https://developer.spotxchange.com/content/local/docs/publisher-resources/kvps.md#key-value-pairs-and-reporting.

This is how  "iris_context" should be formatted as a custom key-value pair:

&custom[iris_context][]=ic_0755895,ic_4890138,ic_4980180&

To pass the "iris_id" publishers can do one of two updates:
1. pass &content[id][]=
(which is the ORTB supported content field and does not need to be mapped to anything. we will simply pass it through)

&content[id][]=iris_18719437&

OpenRTB Integration

The OpenRTB integration leverages the custom KVP object to pass in the iris_context and iris_id KVPs. Here's the documentation from SpotX on how to format custom KVPs in OpenRTB: https://developer.spotxchange.com/content/local/docs/publisher-resources/ortb-2.3-integration.md#video-ext-custom.

This is how "iris_context" and "iris_id" should be formatted in the custom object for the OpenRTB request:

{
custom : {
"iris_context" : [
"ic_0755895",
"ic_4890138"
],

"content": {

     "id": "iris_5e709178df9352dc",

     },

 },

Prebid.org Integration

The Prebid.org integration leverages the custom KVP object to pass in the iris_context and iris_id KVPs. Here's the documentation from SpotX on how to format custom KVPs in Prebid.js

https://developer.spotxchange.com/content/local/docs/HeaderBidding/PrebidAdapter.md#passing-key-value-pairs

iris_context and iris_id should be passed as follows:

var adUnits = [{

    code: 'uniqueId',

   mediaTypes: {

       video: {

            context: 'instream',

           playerSize: [300, 250]

       }

   },

   bids: [{

        bidder: 'spotx',

       params: {

            channel_id: 85394,

            ad_unit: 'instream',

            // ###### KVPS CAN GO HERE #######

            content_id: 'iris_5acf886d06f05102',

custom: {

               iris_context: [

                 ‘ic_0755895’,

                 ‘ic_4890138’,

              ]

           }

           // ###############################

       }

   }]

}];

Any questions, please reach out to your SpotX and IRIS.TV Account Managers.