JW Player Plugin Browser

From Engineering Client Portal

Engineering Portal / Digital / DCR & DTVR / JW Player Plugin Browser

Nielsen Browser SDK Plugin for JWPlayer browser player is enabled for measurement by integrating Nielsen Software Development Kit (SDK).

OS Player Version SDK Version Supported Ad Frameworks Download
{{{alt}}}
iOS
5.1.1 VMAP and VAST Contact Nielsen

Plugin Implementation

Pre-requisites

  • Nielsen App ID (appid): A unique ID that Nielsen assigns to the player / application and is provided upon starting the integration. There are two IDs provided during integration:
  • Nielsen JW Player Plugin URL: This is the Plugin library URL to be included in the Plugins section of the JW Player setup.

JW Player Plugin Integration

The steps for integrating Nielsen Browser SDK with JW Player are as follows:

Add Plugin Library

Add the HTTP or HTTPS version of the plugin URL *(provided below) to the plugins section withing the JW Player setup

    http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js
    https://seccdn-gl.imrworldwide.com/novms/jw/ggjw510.js

Configure SDK

To initialize the SDK with the JW Player Plugin, an initialization object needs to be created within the ‘plugins’ object to include the Configuration Metadata.

    jwplayer("myElement").setup({
    "plugins" :
    {
      "http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js" :
       {
        "apid" : "PHG163HR-XXXX-XXXX-XXXX-67GJKY68GJK7",
        "sfcode" : "dcr-cert",
        "nsdkv" : "511",
        "nol_sdkDebug" : "DEBUG",
        "apn" : "Test_JWPlayer"
       }
    },
    "width": 640,
    // Other parameters for the player. The complete list can be found on JW site.
    });

Note: All parameters except javascript objects must be passed as strings

Create Metadata Objects

Content and ad objects need to be set up with the required Nielsen keys and passed as each individual asset is loaded. Content and ad metadata objects are shown in the sample code below.

Content Object

    // create content object
    var content_metadata_object =
    {
      type: "content",
      assetid: "VID345-67483",
      isfullepisode: "y",
      program: "programName",
      title: "EpisodeTitle S3 E1",
      length: "3600",
      mediaURL: "http://../exampledomain.com",
      segB: "segmentB",
      segC: "segmentC",
      crossId1: "CS-1",
      crossId2: "CS-2",
      airdate: "20161013 20:00:00",
      adloadtype: "2",
      hasAds: "1"
    }

Ad Object

    // create ad object
    var ad_metadata_object =
    {
      assetid: "AD-1",
      type: "preroll"
    }

Opt-Out Implementation

The site must provide a means for the user to opt out of, or opt back into Nielsen Measurement. A user can opt out if preferring to not participate in any Nielsen online measurement research. To implement the Opt-Out option, include the following in the privacy policy page:

  • A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)
  • A link to the Nielsen Digital Measurement Privacy Policy at https://www.nielsen.com/digitalprivacy

On the Nielsen Digital Measurement Privacy Policy page, users can click choices to read more detailed information about the measurement software and their options. The users can click a link to retrieve an Opt-Out cookie if they do not want to participate in Nielsen online measurement.

Nielsen properties may feature Nielsen proprietary measurement software, which will allow the users to contribute to market research, such as Nielsen TV Ratings.

To learn more about the information that Nielsen software may collect and your choices with regard to it, please see the Nielsen Digital Measurement Privacy Policy at https://www.nielsen.com/digitalprivacy.

Opt-In

Once users have opted out, they can choose to opt back into Nielsen Measurement at anytime by selecting the Opt-In link on the Nielsen Digital Privacy Policy page. When a user selects the link, their Opt-Out cookie will be deleted and they will be measured.

Going Live

After the integration is certified, there is one update to be made to the existing code to ensure that the player will be measured properly:

  • Collection Environment: Change the value for sfcode from dcr-cert to dcr to point traffic to the Nielsen production collection environment. Do not use dcr-cert for production traffic

Note: Ensure that the nol_sdkDebug parameter is not used.

Sample Initialization Object

    // Update sfcode value in initialization object and remove nol_sdkDebug
    jwplayer("myElement").setup
    ({
      "plugins" :
        {
          "http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js" :
          {
            "apid" : "PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
            "sfcode" : "dcr",
            "nsdkv" : "511",
            "apn" : "Test_JWPlayer",
            "stream_custom_params": {"dataSrc": "cms"}
          }
        }
    })

Metadata

There are three types of metadata

  • Plugin Configuration Metadata: Used to initialize SDK and Plugin
    • Plugin URL: Must be passed along with the Configuration Metadata.

      Note: No keyname is needed to pass the Plugin URL.

  • Content Metadata: Used to identify content.
  • Ad Metadata: Used to identify ads.

Metadata can be passed through key-value pairs using the Nielsen reserved keys (for collecting the required metadata). The metadata received for each asset is used for classification and reporting.

Plugins Configuration Metadata

Keys Description Values
plugin url (No Keyname Needed for Plugin URL) The plugin url must be established and called within the JW Player Setup, and passed along with all additional configuration metadata. HTTP or HTTPS version can be used. http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js https://seccdn-gl.imrworldwide.com/novms/jw/ggjw510.js
apid Unique ID assigned to player/site. ‘PXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX’
sfcode Location of collection environment. During testing, all traffic should be directed to 'dcr-cert'. testing:'dcr-cert' production:'dcr'
nsdkv Nielsen SDK Version '511'
apn User-defined string value for describing the player / site. custom
nol_sdkDebug Enables Debug Mode which allows output to be viewed in console.

Note: Do not use this in production.

'INFO' – API calls

'WARNING' – System level logs

'ERROR' – Error logs

'DEBUG' – Full logs

Content Metadata

Keys Description Values Type Required
type Type of asset 'content' string Yes
assetid Unique ID assigned to asset custom string Yes
program Program Name custom string Yes
title Episode title custom string Yes
airdate The original airdate for linear TV '20161013 20:00:00' date No
length Length of content in seconds 3600 (0 for live stream) integer Yes
segB Custom Reporting Segment custom string No
segC Custom Reporting Segment custom string No
isfullepisode Full Episode Flag

'y' - Full Episode

'n' - Non Full Episode

boolean Yes
adloadtype Distinguishes Dynamic vs Linear Ad Insertion

'1' - Linear

'2' - Dynamic

integer Yes
crossId1 Standard Episode ID custom string Yes
crossId2 Content Originator ID custom string No
mediaURL URL location of the content being streamed custom string Yes
hasAds Distinguishes when content includes Ads

'0' - No Ads

'1' - Includes Ads

'2' - Unknown

integer Yes

Ad Metadata

Keys Description Values Type Required
type Type of ad

'preroll'

'midroll'

'postroll'

string Yes
assetid Unique ID assigned to ad custom string Yes

Note:There is a URL character limit of 2000 characters imposed due to browser limitations. Exceeding this value can impair data delivery on particular browsers.

Examples of Passing Metadata

Including Metadata for Playlist Mode' In case of using a playlist, use "stream_custom_params" object to provide stream-specific metadata for each playlist item as shown in the example code below.

    jwplayer("myElement").setup
    ({
      "plugins":
      {
        "http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js":
        {
          "apid": "PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "sfcode" : "dcr-cert",
          "nsdkv" : "511",
          "nol_sdkDebug" : "DEBUG",
          "apn" : "Test_JWPlayer"
        }
      },
      "width": 640,
      "height": 360,
      "description": "Test of jwPlayer",
      "playlist":
      [
        {
          "sources":
          [
            {
              "file": "http://yoursite/my1.mp4",
              "type": "video/mp4"
            }
          ],
          "mediaid": "mymovie1-id",
          "title": "My Movie 1",
          "image": "http://yoursite/my_1.png",
          "stream_custom_params":
            {
              "type": "content",
              "assetid": "VID345-67483",
              "isfullepisode": "y",
              "program": "programName",
              "title": "EpisodeTitle S3 E1",
              "length": "3600",
              "mediaURL": "http://../exampledomain.com",
              "segB": "segmentB",
              "segC": "segmentC",
              "crossId1": "CS-1",
              "crossId2": "CS-2",
              "airdate": "20161013 20:00:00",
              "adloadtype": "2",
              "hasAds": "1"
            }
        },
        {
          "sources":
            [
              {
                "file": "http://yoursite/my2.mp4",
                "type": "video/mp4"
              }
            ],
            "mediaid": "mymovie2-id",
            "title": "My Movie 2",
            "image": "http://yoursite/my_2.png",
            "stream_custom_params": {} // Provide new stream metadata here
        }
      ],
      "primary": "html5"
    });


Including Metadata for Single Stream Play If a playlist is not being used and the player is setup to play a single stream, use "stream_custom_params" in the player options as shown in the example code below.

    jwplayer("myElement").setup
    ({
      "plugins":
        {
          "http://cdn-gl.imrworldwide.com/novms/jw/ggjw510.js":
            {
              "apid": "PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
              "sfcode": "dcr-cert",
              "nsdkv": "511",
              "apn": "QA_BrowserSDK_",
              "stream_custom_params":
                {
                  "type": "content",
                  "assetid": "VID345-67483",
                  "isfullepisode": "y",
                  "program": "programName",
                  "title": "EpisodeTitle S3 E1",
                  "length": "3600",
                  "mediaURL": "http://../exampledomain.com",
                  "segB": "segmentB",
                  "segC": "segmentC",
                  "crossId1": "CS-1",
                  "crossId2": "CS-2",
                  "airdate": "20161013 20:00:00",
                  "adloadtype": "2",
                  "hasAds": "1"
                }
            }
        },
        "width": 640,
        "height": 360,
        "title": "My movie 1",
        "description": "Test of jwPlayer",
        "sources":
          [
            {
              "file": "http://mysite/movie1.mp4",
              "type": "video/mp4"
            }
          ],
          "mediaid": "movie1-id",
          "image": "http://mysite/movie1_poster.png"
    });