DCR & DTVR Browser Static Adobe Launch Extension

From Engineering Client Portal

Engineering Portal / Digital / DCR & DTVR / DCR & DTVR Browser Static Adobe Launch Extension

Adobe Launch Extensions

Adobe Launch Extensions are building blocks for mobile application development that reside on Adobe Servers for client utilization. Nielsen provides three Adobe Launch Extensions that can be integrated to an html page containing any number of video players. It allows clients to add the reporting functionality to their site by putting several lines of JavaScript code into the page. This guide focuses on Static Page Measurement only. For detailed information on how to use with Video, please select this link: BSDK Adobe Launch Extension for Video

Extension Installation and Configuration

Nielsen has developed Extensions to simplify adding Nielsen measurement into your video stream. The first step is to create and publish a property which is outlined in the Getting Started Guide.

Install the Extension

When you sign in to the Launch you’ll see the Properties screen first. A property is a container for the tags that you want to deploy and it can be used on one or many sites. Click New Property and enter a name. You will now be able to add an extension. icon

BSDK extension

BSDK extension integrates the Nielsen BSDK, initializes BSDK instances that can be used by any other extension or from the client’s page directly.

Build the Extension

After the Extension is configured, it can be “built” under the “library” on the Publishing page with other “libraries”.

Add a New library

Select to add a new library

icon

Set the name, chose Environment (Production, Staging, Development):

icon

Save and Build

Add all changed resources. When you get the Extension configured, it will appear in the list of changed resources. Select the Latest revision and press “Select & Create a New Revision” button: icon

Confirm

Once built, it will appear in the list of Development libraries:

icon

BDSK Adobe Launch Extension

The following events and API calls are supported:

Event API Function Description
"nls-sdk-init-instance" window.NSDKAPI.initInstance requests BSDK extension to initialize a new SDK instance
"nls-sdk-trackevent" window.NSDKAPI.trackEvent sends data for trackEvent function of the SDK

Event based API

The extension listens to the following custom events:

"window.NSDKAPI.initInstance"

Format of input object is the following:

window.NSDKAPI.initInstance({
  "ext_opt": {
    "debug": "DEBUG",
    "sdk_instance_name": sdk_instance_name,
    "apid": sdkPluginParams.apid
    "opt_params": {
      "apn": sdkPluginParams.apn,
      "sfcode": sdkPluginParams.sfcode,
      "nol_sdkDebug": sdkPluginParams.nol_sdkDebug
    }

  }
});

All parameters and supported values are described below.

Parameter Description Required Values Example
debug Debug flag. If set to "DEBUG", the extension prints
debug messages to the browser console.
No string
"debug": "DEBUG"
sdk_instance_name Name of the BSDK instance. It's used to bind
BSDK and other extensions. If it's not
provided, the extension generates the name.
It can be obtained in the callback function.
No string
"sdk_instance_name": "myPlayer1"
apid APID that is used in Browser SDK Yes string
"apid": "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
opt_params Optional parameters that are passed to
initialization function of Browser SDK
No object
"opt_params":
   {
     "apn": "myApn",
     "sfcode": "code1",
     "nol_sdkDebug": "DEBUG"
   }

Example

function createStatic(playerId) {
  var sdk_instance_name = playerId;

  window.NSDKAPI.initInstance({
    "ext_opt": {
      "debug": "DEBUG",
      "sdk_instance_name": sdk_instance_name,
      "apid": "P00BEB680-1F1A-47BB-922D-1BXXXXXXXXXX"
      "opt_params": {
        "containerID": playerId,
        "apn": "StaticPageTest",
        "sfcode": "dcr",
        "nol_sdkDebug": "DEBUG"
      }

    }
  });

"window.NSDKAPI.trackEvent"

Format of input object is the following:

window.NSDKAPI.trackEvent(
    sdk_instance_name: < name > ,
    var obj = {
        "event": < event identifier > ,
        "type": < type of metadata > ,
        "metadata": {
            "content": < content metadata object > ,
            "ad": < ad metadata object > ,
            "static": < static metadata object >
        },
        "playheadPosition": < playhead value | Unix Timestamp > ,
        "id3Data": < id3 payload > ,
    }
}
}

All parameters and supported values are described below.

Parameter Description Required Values Example
sdk_instance_name Name of the BSDK instance that should
receive the data.
Yes string
"sdk_instance_name": "myPlayer1"
obj Object containing data that is passed
to trackEvent function of Browser SDK
Yes string
"obj": {
 "event": 'playhead',
 "type": 'static',
 "playheadPosition": '1',
 "metadata": {
 "static": {
 "type": 'static',
 "assetid": 'AID885-9984'
 }
}}
callback Function that is called by the extension
to provide the result value. It's true if success.
function
"callback": function (ret) {
   var result = ret.result;
}

Example

var obj = {
  "event": 'playhead', // playhead,pause,complete,adstop
  "type": 'static',
  "playheadPosition": '1',
  "metadata": {
    "content": {},
    "ad": {},
    "static": {
      type: 'static',
      section: 'TrackEvent Homepage',
      assetid: 'AID885-9984',
      segA: 'NielsenEnt',
      segB: 'CustomSegB',
      segC: 'CustomSegC',
      crossId1 : 'Reference'
    }
  }
};
window.NSDKAPI.trackEvent({
  sdk_instance_name: sdk_instance_name,
  obj: obj
});

Tracking the SDK Event

Event Types

The following event types are supported:

Key Description
playhead

It is used to pass content, ad or static metadata, the current playhead value,
Unix timestamp or id3 payload, OTT information to the SDK.

pause

This event should be used when content playback is paused.
(Pause is detected by SDK automatically only if the time gap between commands exceeds 30 minutes.)

complete

It is called when session is completed or ends.

adStop

This event should be called at the end of each ad and is required when advertisements have the same assetId.