Nielsen SDK Documentation

Bundled SDK – DCR Video Implementation Guide

API Version 6.0.0


This guide will show how to integrate the Nielsen Software Development Kit (SDK) to enable Digital Content Ratings (DCR) video measurement on browser players.


To get started, an App ID is needed. The App ID is a unique ID assigned to the player/site/app. This will be provided upon starting the integration.

Browser Integration

Implement the following steps to integrate the Nielsen Browser SDK with the web player.

Configure SDK

There are two steps required for configuring the SDK:

  • Add Static Queue Snippet
  • Create SDK Instance

Add Static Queue Snippet

Add the following script tag to the website:

The static queue snippet allows the SDK APIs to be called while the actual SDK and configuration file are still being downloaded. As the queue can capture all API calls before the download completes, there is no wait time. Once the SDK is available, the API calls will transition from directing to the queue to the SDK seamlessly.

Create SDK Instance

To initialize the SDK, create an SDK instance by making the initialization call:

Initialization API Call

When creating an instance, pass the following three values:

Parameter Description Values
apid Unique ID assigned to player/site. 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
instanceName Name of SDK instance "any string value"
nol_sdkDebug Enables Nielsen console logging. Only required for testing "{nol_sdkDebug: "debug"})"

Example SDK Initialization

When the initialization call is made, a unique static configuration file, <apid>.js, will be downloaded based on the apid and will be cached on the user’s browser.

Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK600.bundle.min.js”.

Example SDK Configuration

The configuration should include the Static Queue Snippet and an SDK Instance for an unique App ID as shown in the example:

Create Metadata Objects

There are two types of asset metadata:

  • content: identify video
  • ad: identify each ad

The metadata received for each asset is used for classification and reporting.

Metadata can be passed through key-values using the Nielsen reserved keys. User will need to set up content and ad objects with the required Nielsen keys as shown in the sample code below.

Content Metadata

Content metadata should remain constant throughout the completion of an episode / clip including the ads play.

Keys Description Values Required
clientid parent ID – value is automatically populated through provided App ID. In order to override the brand configured to the App ID, pass parent value here and the sub-brand ID associated to that brand in the subbrand key (e.g. multiple brands in App) Nielsen provided
vcid sub-brand ID – value is automatically populated through provided App ID. In order to override the sub-brand configured to the App ID, value can be passed here (e.g. multiple sub-brands in App) Nielsen provided
type type of asset "content"
assetid unique ID assigned to asset custom
program name of program (25 character limit) custom
title episode title (40 character limit) custom
length length of content in seconds seconds (86400 for live stream)
mediaURL URL location of the content being streamed custom
segB custom segment B custom
segC custom segment C custom
airdate the airdate in the linear TV YYYYMMDD HH:MI:SS
isfullepisode full episode flag "y"– full episode,
"n"– non full episode
crossId1 standard episode ID custom
crossId2 content originator (only required for distributors) Nielsen provided
adloadtype type of ad load: 1) Linear – matches TV ad load 2) Dynamic – Dynamic Ad Insertion (DAI) "1" – content with linear ads
"2" – content with dynamic ads
hasAds identify if content includes Ads. “0” – no ads
“1” – includes Ads
“2” – unknown (default)

Example Content Object

Ad Object

The ad metadata should be passed for each individual ad.

Keys Description Values Required
type type of ad 'preroll', 'midroll', or 'postroll'
assetid unique ID assigned to ad custom

Example Ad Object

URL Character Limit: There is a URL character limit of 2K characters due to browser limitations. Exceeding this value could impair data delivery on particular browsers.

Call Nielsen APIs

The method for calling events is ggPM().


The events are included in the table below.

Event Parameter Description
'loadMetadata' content/ad metadata object Needs to be called at the beginning of each asset
'setPlayheadPosition' playhead position as integer
VOD: current position in seconds.
Live: current UTC timestamp
Note: setPlayheadPosition has to be called on a secondly basis
Pass playhead position every second during playback
'stop' playhead position Call when content or ads complete playing and pass playhead position
'end' playhead position in seconds Call when the current video asset completes playback and pass the playhead position.
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.

SDK Event Lifecycle

The sample event lifecycle can be used as a reference for identifying the order for calling events.

'setPlayheadPosition' is used for calculating duration and must be passed every second. The final playhead position must be sent for the current asset being played before calling 'stop', 'end', or 'loadmetadata'.

For Ad Pods, events must be called for each individual Ad. Each Ad playhead position should begin at ‘0’ when ad starts.

When content has resumed following an ad break, the playhead position update must continue where previous content segment left off. The playhead position should be passed as a rounded number with no decimals.

Handling Pause

The setPlayheadPostion event is used for handling pause. To indicate pause, stop passing the playhead position to the SDK. Once the content resumes, begin sending the playhead again with the correct playhead value.

Interruption Scenarios

The following possible browser interruption scenarios must be handled:

  • Browser/Tab close
  • Leaving the page to another destination
  • Pressing the stop button

There are many cases where the player itself has the ability to detect such situations. If not, these interruption scenarios can be handled through JavaScript. The events that are called will depend on the asset being played (e.g. midroll vs. content).

User may need to add code to support specific browser versions (e.g. older versions of Internet Explorer).


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 they would prefer not to participate in any Nielsen online measurement research. To implement the opt-out option, include the following two items in your privacy policy.

  • 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

On the Nielsen Digital Measurement Privacy Policy page, users can click Choices to read more detailed information about the measurement software, learn about their options with regard to Nielsen measurement, and, if they do not want to participate in Nielsen online measurement, click a link to receive an opt-out cookie.

The following paragraph is a template for an opt-out statement.

The properties may feature Nielsen proprietary measurement software, which will allow 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

Opt Back In

Once users have opted-out, they can choose to opt back into Nielsen Measurement at anytime by selecting the opt back 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 able to be measured.

Going Live

After the integration has been certified, users will need to make a couple of updates to the initialization call to ensure that player will be measured properly.

  1. App ID: Ensure that correct <apid> is used during initialization.
  2. Debug Logging: Disable logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call.

    Example Production Initialization Call

    Refer to the production initialization call below: