<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://engineeringportal.nielsen.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RyanCarlson</id>
	<title>Engineering Client Portal - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://engineeringportal.nielsen.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RyanCarlson"/>
	<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/wiki/Special:Contributions/RyanCarlson"/>
	<updated>2026-04-04T08:27:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Roku_Cloud_API&amp;diff=2625</id>
		<title>DCR Video &amp; Static Roku Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Roku_Cloud_API&amp;diff=2625"/>
		<updated>2018-03-22T02:12:32Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: sandbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your Roku Apps.&lt;br /&gt;
*For other OTT Apps, please see [[DCR Video &amp;amp; Static Cloud API]]&lt;br /&gt;
*For Mobile Apps, please see [[DCR Video &amp;amp; Static Mobile Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. Once your application has been certified, the URL should be updated to point to the Cloud API production endpoint.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be passed with every request and must remain consistent throughout each individual session.&lt;br /&gt;
&lt;br /&gt;
===Example Roku Sample Code Provided Below:===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionTime = createObject(&amp;quot;roDateTime&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = (sessionTime.asSeconds()).tostr()+(sessionTime.getMilliseconds()).tostr()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CBC00.iv3x2EV0BpHH9AbZK%2FnBWWRhZbj7pD%3D...&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || program genre abbreviation - see [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || The complete event must be sent when the content has completed full playback. Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event must be sent when the session is completed, or terminated. After 30 minutes of inactivity, the session will expire. All creditable duration will be summarized for all asset types when delete occurs (content and ads).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===Example Image Request===&lt;br /&gt;
&lt;br /&gt;
In order to execute Cloud API calls, image requests will need to be established for each event.&lt;br /&gt;
&lt;br /&gt;
===Playhead Image Request Example Code===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
playheadRequest = CreateObject(&amp;quot;roUrlTransfer&amp;quot;)&lt;br /&gt;
                sendUrl = sessionUrl+playheadRequest.Escape(playheadPayload)&lt;br /&gt;
                playheadRequest.SetUrl(sendUrl)&lt;br /&gt;
                xport=CreateObject(&amp;quot;RoMessagePort&amp;quot;)&lt;br /&gt;
                playheadRequest.setport(xport)&lt;br /&gt;
                aa3 = {}&lt;br /&gt;
                aa3[&amp;quot;Connection&amp;quot;] = &amp;quot;keep-alive&amp;quot;&lt;br /&gt;
                aa3[&amp;quot;Content-type&amp;quot;] = &amp;quot;image/gif&amp;quot;&lt;br /&gt;
                playheadRequest.SetHeaders(aa3)&lt;br /&gt;
                playheadRequest.setRequest(&amp;quot;GET&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
&lt;br /&gt;
When playback is interrupted, the app needs to send delete immediately.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionTime = createObject(&amp;quot;roDateTime&amp;quot;)&lt;br /&gt;
sessionID = (sessionTime.asSeconds()).tostr()+(sessionTime.getMilliseconds()).tostr()&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
sendUrl = sessionUrl.Escape(payload)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
print &amp;quot;Playhead Event &amp;quot; + sendUrl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
print &amp;quot;Event Payload &amp;quot;+ playheadPayload + modSeq%.tostr()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
httpCode = GetResponseCode()&lt;br /&gt;
print &amp;quot;Response Code  &amp;quot; +httpCode.tostr()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. This can be implemented in two steps:&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Nielsen Privacy Policy &amp;amp; Roku Channel Disclosure ====&lt;br /&gt;
&lt;br /&gt;
In your application, you must display the Nielsen privacy policy, which instructs users on how to opt out and opt in to Nielsen measurements. This text is usually displayed in an application's &amp;quot;Settings&amp;quot; or &amp;quot;About&amp;quot; screens.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please choose the appropriate &amp;quot;Limit Ad Tracking&amp;quot; setting on your device. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, on your Roku Channel description, you should add the following disclosure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Use &amp;quot;Limit Ad Tracking&amp;quot; setting to set User Opt Out ====&lt;br /&gt;
&lt;br /&gt;
Depending on the user's selection for the &amp;quot;Limit Ad Tracking&amp;quot; device setting, you should set the Cloud API &amp;lt;code&amp;gt;&amp;quot;uoo&amp;quot;&amp;lt;/code&amp;gt; parameter accordingly. Roku provides an API called [https://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo#ifDeviceInfo-IsAdIdTrackingDisabled()asBoolean IsAdIdTrackingDisabled()] to check the user's limit ad tracking setting.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;quot;uoo&amp;quot;&amp;lt;/code&amp;gt; parameter is located in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; JSON object, which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete).&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;encdata&amp;quot;: &amp;quot;&amp;quot;, //Encdata must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your application should check the Limit Ad Tracking setting on each app start, and/or periodically, to ensure the user's ad tracking selection is reflected in the Nielsen opt-out setting in your app.&lt;br /&gt;
&lt;br /&gt;
*In addition, you will need to ensure that the encdata field is populated with a blank value if a user has elected to Opt-Out.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent.&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded.&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections based on the device's &amp;quot;Limit Ad Tracking&amp;quot; setting.&lt;br /&gt;
*Test that the encdata field is populated with a blank value if a user has elected to Opt-Out. For Example: &amp;quot;encdata&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Mobile_Cloud_API&amp;diff=2624</id>
		<title>DCR Video &amp; Static Mobile Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Mobile_Cloud_API&amp;diff=2624"/>
		<updated>2018-03-22T02:10:22Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: sandbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your mobile  apps.&lt;br /&gt;
*For Roku Apps, please see [[DCR Video &amp;amp; Static Roku Cloud API]]&lt;br /&gt;
*For OTT Devices, please see [[DCR Video &amp;amp; Static Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. We will review the update to the production endpoint during the Go Live section of this guide.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be a GUID that is passed with every request and remain consistent throughout each individual session. You can use an existing ID, a random number, or date.now() as shown in the recommended sample code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot; //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| devId || unique ID to identify user (e.g. Advertising ID, Roku Device ID) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On mobile devices you will need to pass the IDFA/Ad ID as part of the devId parameter. Please see the section below regarding Opt Out and the IDFA/Ad ID.&lt;br /&gt;
&lt;br /&gt;
===== Accessing the IDFA on iOS =====&lt;br /&gt;
&lt;br /&gt;
Accessing the ID For Advertisers (IDFA) uses OS level API calls. In order to do this, you must first import the following header file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;#import &amp;lt;AdSupport/ASIdentifierManager.h&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to receive the IDFA as a NSString, use similar code to the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can read more about ASIdentifierManager on Apple's [https://developer.apple.com/reference/adsupport/asidentifiermanager| developer website].&lt;br /&gt;
&lt;br /&gt;
===== Accessing the Ad ID on Android =====&lt;br /&gt;
&lt;br /&gt;
Accessing the Google Ad ID uses OS level API calls. In order to do this, you must first import Google Play Services. Then to receive the Ad ID, use the AdvertisingIdClient class as such:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;public static AdvertisingIdClient.Info getAdvertisingIdInfo (Context context)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the AdvertisingIdClient class on Google's [https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient| developer website].&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || program genre abbreviation - see [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || Complete event must be sent when the content has completed full playback.Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event must be sent when the session is completed, or terminated. After 30 minutes of inactivity, the session will expire. All creditable duration will be summarized for all asset types when delete occurs (content and ads).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Pause / Play&lt;br /&gt;
*Network Loss (Wi-Fi / Airplane Mode / Cellular)&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
*Alarm Interrupt&lt;br /&gt;
*Content Buffering&lt;br /&gt;
*Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
*Channel / Station Change Scenario&lt;br /&gt;
*Unplugging of headphone&lt;br /&gt;
&lt;br /&gt;
When playback is temporarily interrupted (e.g. pause, content buffering), the app needs to send the last known playhead position.&lt;br /&gt;
&lt;br /&gt;
*If an app is sent to background for more than 5 minutes, please create a new session ID. Otherwise, use the same session ID as before.&lt;br /&gt;
*If loss of Internet occurs, please queue the API calls that would have been made. Once Internet connectivity is regained, please spool off the API calls in order of first generated (Note: if doing so, please use the UTC time in milliseconds)&lt;br /&gt;
&lt;br /&gt;
When playback is permanently interrupted, the app needs to send delete immediately.&lt;br /&gt;
*If an app crashes, please create a new session ID. No delete call will be necessary as the previous session will timeout.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes after delete occurs, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);  // Must be GUID for each viewing session&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
var image = new Image()&lt;br /&gt;
image.onerror = function() {&lt;br /&gt;
  // wait and send again&lt;br /&gt;
}&lt;br /&gt;
(new Image).src = sessionURL+encodeURI(JSON.stringify(payload));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event&amp;quot;, image); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event Payload&amp;quot;, payload); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
code = msg.GetResponseCode();&lt;br /&gt;
console.log(&amp;quot;Response Code&amp;quot;, code); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. The Opt-Out requirement can be fulfilled by creating an Opt-Out/Opt-In button, toggle switch, or slider within the app &amp;quot;Settings&amp;quot;, or &amp;quot;About&amp;quot; section to allow the user selection. If you have the ability to render text within the Opt-Out screen, it is recommended to add the Privacy Information included below.&lt;br /&gt;
&lt;br /&gt;
[[File:Nielsen Opt-Out.png|link=]]&lt;br /&gt;
&lt;br /&gt;
You will need to store the User Opt-Out (uoo) status, so that it can be retrieved and populated in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; metadata which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete). &lt;br /&gt;
&lt;br /&gt;
*In addition, you will need to ensure that the devId field is a blank value if a user has elected to Opt-Out&lt;br /&gt;
&lt;br /&gt;
*If the device offers &amp;quot;Limit Ad Tracking&amp;quot; or &amp;quot;Opt-Out&amp;quot; device settings, you must set uoo=true, and also ensure that the devId is set to a blank value if the user elects to enable this setting.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement (Recommended Default Setting) || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;7be25cf9-8c40-5cc2-871e-19bf41940288&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;, //devId must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Privacy Information Template To Include In Opt-Out Screen =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please make the appropriate selection within the app. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''''Disclosure Template'''''&lt;br /&gt;
&lt;br /&gt;
Additionally, you must update the App description information from the App Distribution Store with the Nielsen Measurement disclosure below:&lt;br /&gt;
&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections by validating the Cloud API events called after the user Opt-Out/Opt-In selection.&lt;br /&gt;
*Test that the devId field is populated with a blank value if a user has elected to Opt-Out. For example: &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
*If the device supports &amp;quot;Limit Ad Tracking&amp;quot; or has device &amp;quot;Opt-Out&amp;quot; settings, test that uoo=true, and that devId is set to a blank value if enabled in the device settings.&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Cloud_API&amp;diff=2623</id>
		<title>DCR Video &amp; Static Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Cloud_API&amp;diff=2623"/>
		<updated>2018-03-22T02:08:18Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: sandbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your over-the-top (OTT) Apps.&lt;br /&gt;
*For Roku Apps, please see [[DCR Video &amp;amp; Static Roku Cloud API]]&lt;br /&gt;
*For Mobile Apps, please see [[DCR Video &amp;amp; Static Mobile Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. We will review the update to the production endpoint during the Go Live section of this guide.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be a GUID that is passed with every request and remain consistent throughout each individual session. You can use an existing ID, a random number, or date.now() as shown in the recommended sample code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot; //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| devId || unique ID to identify user (e.g. Advertising ID, Roku Device ID) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || Genre (required only for non-TV originated content). See [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Required for non-TV originated content&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || Complete event must be sent when the content has completed full playback or if a user has initiated a Stop. Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit. Complete does not need to be called if a user transitions videos (e.g. channel change or selecting a new VOD asset) before the video completes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event should be sent when the application is exited and the viewing session is completed. After 30 minutes of inactivity, the session will expire automatically. All creditable duration will be summarized for all asset types when delete occurs (content and ads). Note that the delete event may not be feasible on certain platforms that do not offer the necessary callbacks to trigger this event.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
&lt;br /&gt;
When playback is interrupted, the app needs to send delete immediately.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);  // Must be GUID for each viewing session&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
var image = new Image()&lt;br /&gt;
image.onerror = function() {&lt;br /&gt;
  // wait and send again&lt;br /&gt;
}&lt;br /&gt;
(new Image).src = sessionURL+encodeURI(JSON.stringify(payload));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event&amp;quot;, image); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event Payload&amp;quot;, payload); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
code = msg.GetResponseCode();&lt;br /&gt;
console.log(&amp;quot;Response Code&amp;quot;, code); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. This requirement can be fulfilled by checking the device OS for the user's setting of &amp;quot;Limit Ad Tracking&amp;quot; or similar option. If the device offers &amp;quot;Limit Ad Tracking&amp;quot; settings, you must set uoo=true or uoo=false depending on the user's privacy setting. Also, ensure that the devId is set to a blank value if the user elects to opt-out.&lt;br /&gt;
&lt;br /&gt;
If the device does not have OS-level &amp;quot;Do Not Track&amp;quot; settings, you can implement opt-out by creating an Opt-Out/Opt-In button, toggle switch, or slider within the app &amp;quot;Settings&amp;quot;, or &amp;quot;About&amp;quot; section to allow the user selection. If you have the ability to render text within the Opt-Out screen, it is recommended to add the Privacy Information included below.&lt;br /&gt;
&lt;br /&gt;
[[File:Nielsen Opt-Out.png|link=]]&lt;br /&gt;
&lt;br /&gt;
You will need to store the User Opt-Out (uoo) status, so that it can be retrieved and populated in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; metadata which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement (Recommended Default Setting) || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;7be25cf9-8c40-5cc2-871e-19bf41940288&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;, //devId must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Privacy Information Template To Include In Opt-Out Screen =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please toggle your &amp;quot;Limit Ad Tracking&amp;quot; (or similar setting) on your device. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''''Disclosure Template'''''&lt;br /&gt;
&lt;br /&gt;
Additionally, you must update the App description information from the App Distribution Store with the Nielsen Measurement disclosure below:&lt;br /&gt;
&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit, if the platform has the necessary exit callback events.&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections by validating the Cloud API events called after the user Opt-Out/Opt-In selection.&lt;br /&gt;
*Test that the devId field is populated with a blank value if a user has elected to Opt-Out. For example: &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
*If the device supports &amp;quot;Limit Ad Tracking&amp;quot; or has device &amp;quot;Opt-Out&amp;quot; settings, test that uoo=true, and that devId is set to a blank value if enabled in the device settings.&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Cloud_API&amp;diff=2622</id>
		<title>DCR Video &amp; Static Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Cloud_API&amp;diff=2622"/>
		<updated>2018-03-22T02:07:08Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: sandbox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your over-the-top (OTT) Apps.&lt;br /&gt;
*For Roku Apps, please see [[DCR Video &amp;amp; Static Roku Cloud API]]&lt;br /&gt;
*For Mobile Apps, please see [[DCR Video &amp;amp; Static Mobile Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;https://sandbox-cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. We will review the update to the production endpoint during the Go Live section of this guide.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be a GUID that is passed with every request and remain consistent throughout each individual session. You can use an existing ID, a random number, or date.now() as shown in the recommended sample code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot; //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| devId || unique ID to identify user (e.g. Advertising ID, Roku Device ID) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || Genre (required only for non-TV originated content). See [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Required for non-TV originated content&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || Complete event must be sent when the content has completed full playback or if a user has initiated a Stop. Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit. Complete does not need to be called if a user transitions videos (e.g. channel change or selecting a new VOD asset) before the video completes.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event should be sent when the application is exited and the viewing session is completed. After 30 minutes of inactivity, the session will expire automatically. All creditable duration will be summarized for all asset types when delete occurs (content and ads). Note that the delete event may not be feasible on certain platforms that do not offer the necessary callbacks to trigger this event.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
&lt;br /&gt;
When playback is interrupted, the app needs to send delete immediately.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);  // Must be GUID for each viewing session&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
var image = new Image()&lt;br /&gt;
image.onerror = function() {&lt;br /&gt;
  // wait and send again&lt;br /&gt;
}&lt;br /&gt;
(new Image).src = sessionURL+encodeURI(JSON.stringify(payload));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event&amp;quot;, image); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event Payload&amp;quot;, payload); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
code = msg.GetResponseCode();&lt;br /&gt;
console.log(&amp;quot;Response Code&amp;quot;, code); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. This requirement can be fulfilled by checking the device OS for the user's setting of &amp;quot;Limit Ad Tracking&amp;quot; or similar option. If the device offers &amp;quot;Limit Ad Tracking&amp;quot; settings, you must set uoo=true or uoo=false depending on the user's privacy setting. Also, ensure that the devId is set to a blank value if the user elects to opt-out.&lt;br /&gt;
&lt;br /&gt;
If the device does not have OS-level &amp;quot;Do Not Track&amp;quot; settings, you can implement opt-out by creating an Opt-Out/Opt-In button, toggle switch, or slider within the app &amp;quot;Settings&amp;quot;, or &amp;quot;About&amp;quot; section to allow the user selection. If you have the ability to render text within the Opt-Out screen, it is recommended to add the Privacy Information included below.&lt;br /&gt;
&lt;br /&gt;
[[File:Nielsen Opt-Out.png|link=]]&lt;br /&gt;
&lt;br /&gt;
You will need to store the User Opt-Out (uoo) status, so that it can be retrieved and populated in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; metadata which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement (Recommended Default Setting) || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;7be25cf9-8c40-5cc2-871e-19bf41940288&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;, //devId must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Privacy Information Template To Include In Opt-Out Screen =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please toggle your &amp;quot;Limit Ad Tracking&amp;quot; (or similar setting) on your device. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''''Disclosure Template'''''&lt;br /&gt;
&lt;br /&gt;
Additionally, you must update the App description information from the App Distribution Store with the Nielsen Measurement disclosure below:&lt;br /&gt;
&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit, if the platform has the necessary exit callback events.&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections by validating the Cloud API events called after the user Opt-Out/Opt-In selection.&lt;br /&gt;
*Test that the devId field is populated with a blank value if a user has elected to Opt-Out. For example: &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
*If the device supports &amp;quot;Limit Ad Tracking&amp;quot; or has device &amp;quot;Opt-Out&amp;quot; settings, test that uoo=true, and that devId is set to a blank value if enabled in the device settings.&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Browser_SDK&amp;diff=2044</id>
		<title>DTVR Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Browser_SDK&amp;diff=2044"/>
		<updated>2017-11-08T22:11:35Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adModel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}   {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the Browser SDK, the following details are required:&lt;br /&gt;
* '''App ID (apid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Location of collection environment. Please set the sfcode to “dcr“.&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
There are two steps required for configuring your SDK: 1. Add Static Queue Snippet and 2. Create SDK Instance.&lt;br /&gt;
&lt;br /&gt;
== Add Static Queue Snippet ==&lt;br /&gt;
Add the following script tag to your website:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    ! function(t, n) {&lt;br /&gt;
        t[n] = t[n] || {&lt;br /&gt;
            nlsQ: function(e, o, c, r, s, i) {&lt;br /&gt;
                return s = t.document,&lt;br /&gt;
                    r = s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
                    r.async = 1,&lt;br /&gt;
                    r.src = (&amp;quot;http:&amp;quot; === t.location.protocol ? &amp;quot;http:&amp;quot; : &amp;quot;https:&amp;quot;) + &amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot; + e + &amp;quot;.js#name=&amp;quot; + o + &amp;quot;&amp;amp;ns=&amp;quot; + n,&lt;br /&gt;
                    i = s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
                    i.parentNode.insertBefore(r, i),&lt;br /&gt;
                    t[n][o] = t[n][o] || {&lt;br /&gt;
                        g: c || {},&lt;br /&gt;
                        ggPM: function(e, c, r, s, i) {&lt;br /&gt;
                            (t[n][o].q = t[n][o].q || []).push([e, c, r, s, i])&lt;br /&gt;
                        }&lt;br /&gt;
                    }, t[n][o]&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    (window, &amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The static queue snippet allows the SDK APIs to be called while the actual SDK and configuration file are still being downloaded. Since the queue is able to 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.&lt;br /&gt;
&lt;br /&gt;
== Create SDK Instance ==&lt;br /&gt;
To initialize the SDK, you will need to create an SDK instance by making the initialization call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
NOLBUNDLE.nlsQ(&amp;quot;&amp;lt;apid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;instanceName&amp;gt;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When creating your instance, you will need to pass three parameter values. The available parameters are listed in the table below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value !! Required? (Y/N)&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. &lt;br /&gt;
|| &amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || User-defined string value for describing the player/site. || Client specified || Yes&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Location of collection environment. All traffic should be directed to &amp;quot;dcr&amp;quot;. || dcr || Yes&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug:&amp;quot;debug&amp;quot; || Enables Debug Mode which allows output to be viewed in console. || &amp;quot;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;quot; || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example SDK Initialization ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static configuration file, &amp;lt;apid&amp;gt;.js, will be downloaded based on your apid and cached on the user's browser.&lt;br /&gt;
&lt;br /&gt;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: &amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example SDK Initialization ===&lt;br /&gt;
Your configuration should include the Static Queue Snippet and an SDK Instance for your unique App ID as shown in the example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//Add Static Queue Snippet&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    ! function(t, n) {&lt;br /&gt;
        t[n] = t[n] || {&lt;br /&gt;
            nlsQ: function(e, o, c, r, s, i) {&lt;br /&gt;
                return s = t.document,&lt;br /&gt;
                    r = s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
                    r.async = 1,&lt;br /&gt;
                    r.src = (&amp;quot;http:&amp;quot; === t.location.protocol ? &amp;quot;http:&amp;quot; : &amp;quot;https:&amp;quot;) + &amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot; + e + &amp;quot;.js#name=&amp;quot; + o + &amp;quot;&amp;amp;ns=&amp;quot; + n,&lt;br /&gt;
                    i = s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
                    i.parentNode.insertBefore(r, i),&lt;br /&gt;
                    t[n][o] = t[n][o] || {&lt;br /&gt;
                        g: c || {},&lt;br /&gt;
                        ggPM: function(e, c, r, s, i) {&lt;br /&gt;
                            (t[n][o].q = t[n][o].q || []).push([e, c, r, s, i])&lt;br /&gt;
                        }&lt;br /&gt;
                    }, t[n][o]&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    (window, &amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//Create SDK Instance&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Metadata Objects ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two types of asset metadata:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*content: identify video&lt;br /&gt;
*ad: identify each ad&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content Metadata ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode or live stream.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type ||	type of asset	|| &amp;quot;content&amp;quot;	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| channelName	|| Any string representing the channel/stream	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| adModel	|| linear vs dynamic ad model	|| * 1) - Linear – matches TV ad load * 2) Dynamic – Dynamic Ad Insertion (DAI)     || ✓&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; var contentMetadataObject =&lt;br /&gt;
{  &lt;br /&gt;
  type: 'content',&lt;br /&gt;
  channelName: 'Live Player',&lt;br /&gt;
  adModel: '1'&lt;br /&gt;
};&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ad Metadata Object ===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The ad metadata should be passed for each individual ad, if ads are available during or before the stream begins.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type	|| type of ad	|| 'preroll', 'midroll', or 'postroll' ||	✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to ad	|| custom	|| ✓&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example Ad Object'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; var adMetadataObject = &lt;br /&gt;
{  &lt;br /&gt;
  assetid: 'AD-1',&lt;br /&gt;
  type:    'preroll'&lt;br /&gt;
};&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Events ===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !!	Parameter	!! Description&lt;br /&gt;
|-&lt;br /&gt;
| 'loadMetadata'	|| content/ad metadata object	|| Needs to be called at the beginning of each asset to pass type, channelName, and adModel.&lt;br /&gt;
|-&lt;br /&gt;
| 'sendID3'	|| Used to send the ID3 tag payload retrieved from the stream || Needs to be called at the beginning of playback&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| 'end'	|| playhead position in seconds	|| Call when the current video asset completes playback or when a stream is interrupted. &amp;lt;br/&amp;gt;&lt;br /&gt;
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure and fire API calls ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The syntax for firing events is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;    nSdkInstance.ggPM(&amp;quot;event&amp;quot;, parameter object);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Event is passed in parameter 1 and the argument is passed in parameter 2.&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - loadMetadata ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Use [[loadMetadata (Browser)]] to pass the metadata object. The data must be passed as a JSON string.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;loadMetadata&amp;quot;, metadataObject);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - sendID3 ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Use [[sendID3 (Browser)]] to send ID3 payload of the HLS content being played. This will allow the ID3 payload to be sent every time an ID3 packet is received (approximately, once in every 10 seconds).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;sendID3&amp;quot;, ID3_Object);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== Sample ID3 tags ====&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/X100zdCIGeIlgZnkYj6UvQ==/AAAB2Jz2_k74GXSzx4npHuI_&amp;lt;wbr /&amp;gt;JwJd3QSUpW30rDkGTcbHEzIMWleCzM-uvNOP9fzJcQMWQLJqzXMCAxParOb5sGijSV9dNM3QiBniJYGZ5GI-lL1fXTTN0IgZ4iWBmeRiPpS9AAAAAAAAAAAAAAAAAAAAAFJWFM5SVhTONNU=/00000/00000/00&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/R8WHe7pEBeqBhu8jTeXydg==/AAICoyitYqlxT7n6aZ0oMCGhe&amp;lt;wbr /&amp;gt;Fi4CXFp46AMUPZz1lMr_M9tr3_cjee1SHqxrOiVerMDLeyn9xzocZSKwi746Re8vNOtpNCAZjYABs_J0R25IHpvOc1HS8&amp;lt;wbr /&amp;gt;QHGgD5TgOJeS6gX100zdCIGeIlgZnkYj6UvVJWFNhSVhTiPE0=/00000/46016/00&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ID3_Object&amp;lt;/code&amp;gt; is the container to pass the retrieved ID3 tag from the streaming. The player should look for 'PRIV' ID3 tags and send 'owner' field (which typically starts from &amp;quot;www.nielsen.com&amp;quot;) through this API. Refer to [[Browser SDK API Reference#Retrieving ID3 Tags|Browser SDK API Reference - Retrieving ID3 Tags]] for more information.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to [[Browser SDK API Reference#Retrieving ID3 Tags|Browser SDK API Reference - Retrieving ID3 Tags]] section to know more details.&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - end ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Call [[end (Browser)]] only at the end of playback, or if the stream is interrupted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;end&amp;quot;, UTC_Timestamp);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDK DTVR Event Sequence ==&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; // START OF STREAM&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject); &lt;br /&gt;
nSdkInstance.ggPM('sendID3', ID3_Payload);&lt;br /&gt;
&lt;br /&gt;
//Upon completion of a stream, or upon an interruption scenario call 'end' and pass the UTC timestamp&lt;br /&gt;
&lt;br /&gt;
nSdkInstance.ggPM('end', UTC_TIMESTAMP);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nielsen Opt-Out ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings).&lt;br /&gt;
*A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
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, please see the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Opt Back In===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Browser_SDK&amp;diff=2043</id>
		<title>DTVR Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Browser_SDK&amp;diff=2043"/>
		<updated>2017-11-08T22:11:12Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adModel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}   {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the Browser SDK, the following details are required:&lt;br /&gt;
* '''App ID (apid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Location of collection environment. Please set the sfcode to “dcr“.&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
There are two steps required for configuring your SDK: 1. Add Static Queue Snippet and 2. Create SDK Instance.&lt;br /&gt;
&lt;br /&gt;
== Add Static Queue Snippet ==&lt;br /&gt;
Add the following script tag to your website:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    ! function(t, n) {&lt;br /&gt;
        t[n] = t[n] || {&lt;br /&gt;
            nlsQ: function(e, o, c, r, s, i) {&lt;br /&gt;
                return s = t.document,&lt;br /&gt;
                    r = s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
                    r.async = 1,&lt;br /&gt;
                    r.src = (&amp;quot;http:&amp;quot; === t.location.protocol ? &amp;quot;http:&amp;quot; : &amp;quot;https:&amp;quot;) + &amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot; + e + &amp;quot;.js#name=&amp;quot; + o + &amp;quot;&amp;amp;ns=&amp;quot; + n,&lt;br /&gt;
                    i = s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
                    i.parentNode.insertBefore(r, i),&lt;br /&gt;
                    t[n][o] = t[n][o] || {&lt;br /&gt;
                        g: c || {},&lt;br /&gt;
                        ggPM: function(e, c, r, s, i) {&lt;br /&gt;
                            (t[n][o].q = t[n][o].q || []).push([e, c, r, s, i])&lt;br /&gt;
                        }&lt;br /&gt;
                    }, t[n][o]&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    (window, &amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The static queue snippet allows the SDK APIs to be called while the actual SDK and configuration file are still being downloaded. Since the queue is able to 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.&lt;br /&gt;
&lt;br /&gt;
== Create SDK Instance ==&lt;br /&gt;
To initialize the SDK, you will need to create an SDK instance by making the initialization call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
NOLBUNDLE.nlsQ(&amp;quot;&amp;lt;apid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;instanceName&amp;gt;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
When creating your instance, you will need to pass three parameter values. The available parameters are listed in the table below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value !! Required? (Y/N)&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. &lt;br /&gt;
|| &amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || User-defined string value for describing the player/site. || Client specified || Yes&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Location of collection environment. All traffic should be directed to &amp;quot;dcr&amp;quot;. || dcr || Yes&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug:&amp;quot;debug&amp;quot; || Enables Debug Mode which allows output to be viewed in console. || &amp;quot;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;quot; || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example SDK Initialization ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static configuration file, &amp;lt;apid&amp;gt;.js, will be downloaded based on your apid and cached on the user's browser.&lt;br /&gt;
&lt;br /&gt;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: &amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Example SDK Initialization ===&lt;br /&gt;
Your configuration should include the Static Queue Snippet and an SDK Instance for your unique App ID as shown in the example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//Add Static Queue Snippet&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
    ! function(t, n) {&lt;br /&gt;
        t[n] = t[n] || {&lt;br /&gt;
            nlsQ: function(e, o, c, r, s, i) {&lt;br /&gt;
                return s = t.document,&lt;br /&gt;
                    r = s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
                    r.async = 1,&lt;br /&gt;
                    r.src = (&amp;quot;http:&amp;quot; === t.location.protocol ? &amp;quot;http:&amp;quot; : &amp;quot;https:&amp;quot;) + &amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot; + e + &amp;quot;.js#name=&amp;quot; + o + &amp;quot;&amp;amp;ns=&amp;quot; + n,&lt;br /&gt;
                    i = s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
                    i.parentNode.insertBefore(r, i),&lt;br /&gt;
                    t[n][o] = t[n][o] || {&lt;br /&gt;
                        g: c || {},&lt;br /&gt;
                        ggPM: function(e, c, r, s, i) {&lt;br /&gt;
                            (t[n][o].q = t[n][o].q || []).push([e, c, r, s, i])&lt;br /&gt;
                        }&lt;br /&gt;
                    }, t[n][o]&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    (window, &amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
//Create SDK Instance&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Metadata Objects ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two types of asset metadata:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*content: identify video&lt;br /&gt;
*ad: identify each ad&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content Metadata ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode or live stream.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type ||	type of asset	|| &amp;quot;content&amp;quot;	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| channelName	|| Any string representing the channel/stream	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| adModel	|| linear vs dynamic ad model	|| * 1) - Linear – matches TV ad load * 2) Dynamic – Dynamic Ad Insertion (DAI)     || ✓&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; var contentMetadataObject =&lt;br /&gt;
{  &lt;br /&gt;
  type: 'content',&lt;br /&gt;
  channelName: 'Live Player',&lt;br /&gt;
  adModel: '1'&lt;br /&gt;
};&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ad Metadata Object ===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The ad metadata should be passed for each individual ad, if ads are available during or before the stream begins.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type	|| type of ad	|| 'preroll', 'midroll', or 'postroll' ||	✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to ad	|| custom	|| ✓&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example Ad Object'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; var adMetadataObject = &lt;br /&gt;
{  &lt;br /&gt;
  assetid: 'AD-1',&lt;br /&gt;
  type:    'preroll'&lt;br /&gt;
};&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Events ===&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !!	Parameter	!! Description&lt;br /&gt;
|-&lt;br /&gt;
| 'loadMetadata'	|| content/ad metadata object	|| Needs to be called at the beginning of each asset to pass type, channelName, and adloadtype.&lt;br /&gt;
|-&lt;br /&gt;
| 'sendID3'	|| Used to send the ID3 tag payload retrieved from the stream || Needs to be called at the beginning of playback&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| 'end'	|| playhead position in seconds	|| Call when the current video asset completes playback or when a stream is interrupted. &amp;lt;br/&amp;gt;&lt;br /&gt;
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Configure and fire API calls ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
The syntax for firing events is:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;    nSdkInstance.ggPM(&amp;quot;event&amp;quot;, parameter object);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Event is passed in parameter 1 and the argument is passed in parameter 2.&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - loadMetadata ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Use [[loadMetadata (Browser)]] to pass the metadata object. The data must be passed as a JSON string.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;loadMetadata&amp;quot;, metadataObject);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - sendID3 ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Use [[sendID3 (Browser)]] to send ID3 payload of the HLS content being played. This will allow the ID3 payload to be sent every time an ID3 packet is received (approximately, once in every 10 seconds).&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;sendID3&amp;quot;, ID3_Object);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
==== Sample ID3 tags ====&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/X100zdCIGeIlgZnkYj6UvQ==/AAAB2Jz2_k74GXSzx4npHuI_&amp;lt;wbr /&amp;gt;JwJd3QSUpW30rDkGTcbHEzIMWleCzM-uvNOP9fzJcQMWQLJqzXMCAxParOb5sGijSV9dNM3QiBniJYGZ5GI-lL1fXTTN0IgZ4iWBmeRiPpS9AAAAAAAAAAAAAAAAAAAAAFJWFM5SVhTONNU=/00000/00000/00&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/R8WHe7pEBeqBhu8jTeXydg==/AAICoyitYqlxT7n6aZ0oMCGhe&amp;lt;wbr /&amp;gt;Fi4CXFp46AMUPZz1lMr_M9tr3_cjee1SHqxrOiVerMDLeyn9xzocZSKwi746Re8vNOtpNCAZjYABs_J0R25IHpvOc1HS8&amp;lt;wbr /&amp;gt;QHGgD5TgOJeS6gX100zdCIGeIlgZnkYj6UvVJWFNhSVhTiPE0=/00000/46016/00&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;ID3_Object&amp;lt;/code&amp;gt; is the container to pass the retrieved ID3 tag from the streaming. The player should look for 'PRIV' ID3 tags and send 'owner' field (which typically starts from &amp;quot;www.nielsen.com&amp;quot;) through this API. Refer to [[Browser SDK API Reference#Retrieving ID3 Tags|Browser SDK API Reference - Retrieving ID3 Tags]] for more information.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Refer to [[Browser SDK API Reference#Retrieving ID3 Tags|Browser SDK API Reference - Retrieving ID3 Tags]] section to know more details.&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - end ===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Call [[end (Browser)]] only at the end of playback, or if the stream is interrupted.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;end&amp;quot;, UTC_Timestamp);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SDK DTVR Event Sequence ==&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; // START OF STREAM&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject); &lt;br /&gt;
nSdkInstance.ggPM('sendID3', ID3_Payload);&lt;br /&gt;
&lt;br /&gt;
//Upon completion of a stream, or upon an interruption scenario call 'end' and pass the UTC timestamp&lt;br /&gt;
&lt;br /&gt;
nSdkInstance.ggPM('end', UTC_TIMESTAMP);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nielsen Opt-Out ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
*A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings).&lt;br /&gt;
*A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
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, please see the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Opt Back In===&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Android_SDK&amp;diff=2042</id>
		<title>DTVR Android SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Android_SDK&amp;diff=2042"/>
		<updated>2017-11-08T22:10:00Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adModel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the App SDK, the following details are required:&lt;br /&gt;
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.&lt;br /&gt;
* '''Nielsen SDK''' and '''Sample Player''': A part of the downloaded package&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
Refer to [[Digital Measurement Onboarding]] for more information on how to get a Nielsen App SDK and appid.&lt;br /&gt;
&lt;br /&gt;
== Import Library ==&lt;br /&gt;
Refer to [[Android SDK API Reference#Setting Up Development Environment|Android SDK API Reference - Setting Up Development Environment]] for information on importing libraries.&lt;br /&gt;
* The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: The latest version of App SDK contains only appsdk.jar file and does not feature any native shared libraries like libAppSdk.so.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Initialize SDK ==&lt;br /&gt;
Initialize App SDK as soon as the application is launched. Refer to [[Android SDK API Reference#Initialization|Android SDK API Reference - Initialization]] for details on initializing an AppSDK object and the parameters required.&lt;br /&gt;
&lt;br /&gt;
== Configure and fire API calls ==&lt;br /&gt;
=== Configure API calls - play ===&lt;br /&gt;
Call [[play()]] when starting or resuming a streaming session to pass the channel descriptor information through &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; parameter when the user taps the '''Play''' button on the player.&lt;br /&gt;
* &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; is a 32-character free-form text field containing the name of the program or feed being sent (such as ESPN2, Food Network, etc.)&lt;br /&gt;
Call [[play()]] with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
      &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - loadMetadata ===&lt;br /&gt;
Load the CMS metadata by calling [[loadMetadata|loadMetadata()]] on the SDK object.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;    loadMetadata(JSONObject jsonMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Refer to [[Digital Measurement Metadata]] for the list of parameters to be passed in the JSON object.&lt;br /&gt;
Call [[loadMetadata()]] for the content after the first [[play()]] call. Call [[loadMetadata()]] with JSON metadata for the active content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
      &amp;quot;adModel&amp;quot;: &amp;quot;1&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - sendID3 ===&lt;br /&gt;
[[sendID3()]] API is a receiver for HLS timed metadata events (ID3 tags) provided through the notification system. This API filters out Nielsen-specific ID3 tags from the system and buffers the data for transfer to Nielsen’s collection facility. Call [[sendID3()]] whenever new Nielsen ID3 metadata is available for processing during session playback.&lt;br /&gt;
==== Sample ID3 tags ====&lt;br /&gt;
* &amp;lt;code&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/X100zdCIGeIlgZnkYj6UvQ==/AAAB2Jz2_k74GXSzx4npHuI_&amp;lt;wbr /&amp;gt;JwJd3QSUpW30rDkGTcbHEzIMWleCzM-uvNOP9fzJcQMWQLJqzXMCAxParOb5sGijSV9dNM3QiBniJYGZ5GI-lL1fXTTN0IgZ4iWBmeRiPpS9AAAAAAAAAAAAAAAAAAAAAFJWFM5SVhTONNU=/00000/00000/00&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/R8WHe7pEBeqBhu8jTeXydg==/AAICoyitYqlxT7n6aZ0oMCGhe&amp;lt;wbr /&amp;gt;Fi4CXFp46AMUPZz1lMr_M9tr3_cjee1SHqxrOiVerMDLeyn9xzocZSKwi746Re8vNOtpNCAZjYABs_J0R25IHpvOc1HS8&amp;lt;wbr /&amp;gt;QHGgD5TgOJeS6gX100zdCIGeIlgZnkYj6UvVJWFNhSVhTiPE0=/00000/46016/00&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': ID3 tags are not applicable for International (Germany)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refer to [[Android SDK API Reference#Retrieving ID3 Tags|Android SDK API Reference - Retrieving ID3 Tags]] section to know more details.&lt;br /&gt;
&lt;br /&gt;
===Configure API calls - stop ===&lt;br /&gt;
Call [[stop()]] only when the stream playback is stopped by a user. Common events are; network loss, power / standby, incoming call, alarm, etc. Call [[stop()]] only when buffering continues for 30 seconds (not when it starts). Call [[play()]] when resuming a stream (previously stopped) or starting playback of a new stream.&lt;br /&gt;
&lt;br /&gt;
===Configure API calls - end ===&lt;br /&gt;
Call [[end()]] only at the end of playback. Not mandatory if stream is live/does not end.&lt;br /&gt;
&lt;br /&gt;
==API Call sequence==&lt;br /&gt;
===Use Case 1: Content has no Advertisements===&lt;br /&gt;
Call [[play()]] with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use Case 2: Content has linear (non-DAI) Advertisements===&lt;br /&gt;
Call [[play()]] (for the first ad) with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for the active content as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;adModel&amp;quot;: &amp;quot;1&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[sendID3()]] with ID3 payload&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
    sendID3(payload)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handling Foreground and Background states of App==&lt;br /&gt;
&lt;br /&gt;
There are two ways of handling the foreground and background states of the client application.&lt;br /&gt;
*Let App SDK handle the app states information (foreground / background) and use it, as necessary.&lt;br /&gt;
*Capture app states through the application and trigger the corresponding API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state. This allows Nielsen App SDK to know the app state.&lt;br /&gt;
&lt;br /&gt;
=== New devices (Android 4.0 and later versions) ===&lt;br /&gt;
&lt;br /&gt;
'''Add ''application'' tag to Manifest XML file'''&lt;br /&gt;
When a client’s app supports only new devices (Android 4.0 and above) and the client has not implemented a custom Application class for some other purpose,&lt;br /&gt;
* Add the following entry (application tag) into the Manifest XML file to use SDK’s state detection feature.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;   &amp;lt;application android:name=&amp;quot;com.nielsen.app.sdk.AppSdkApplication&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This is the custom Application class where the whole background detection implementation is done. No new permissions are required to change the properties in Manifest XML file.&lt;br /&gt;
&lt;br /&gt;
=== Older devices (Android 4.0 or earlier version) ===&lt;br /&gt;
&lt;br /&gt;
Identify the change of state through the application and call the respective API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state (foreground / background). The SDK will use this information to pass the app launch times, etc. to Collection facility.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
AppLaunchMeasurementManager.appInForeground(getApplicationContext());&lt;br /&gt;
AppLaunchMeasurementManager.appInBackground(getApplicationContext());&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interruptions during playback ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call [[stop()]] immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Start sending pings – [[loadMetadata()]] and [[sendID3()]] for the new viewing session, once the playback resumes.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Nielsen Measurement Opt-Out Implementation ==&lt;br /&gt;
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
* When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from [[userOptOutURLString()]]) should be displayed.&lt;br /&gt;
** Use [[getOptOutStatus()]] to retrieve the device’s Opt-Out status.&lt;br /&gt;
* This Opt-out page should be displayed in a webview (within the app) and not in any external browser.&lt;br /&gt;
* Capture the user’s selection in this page and pass it to the SDK through [[userOptOut()]] for Nielsen to save the user’s preference.&lt;br /&gt;
* For more details, refer to [[Android SDK API Reference#Android Opt-Out Implementation|Android SDK API Reference - Android Opt-Out Implementation]] and Nielsen Digital Privacy.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - App ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Android_SDK&amp;diff=2041</id>
		<title>DTVR Android SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DTVR_Android_SDK&amp;diff=2041"/>
		<updated>2017-11-08T22:09:38Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adModel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the App SDK, the following details are required:&lt;br /&gt;
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.&lt;br /&gt;
* '''Nielsen SDK''' and '''Sample Player''': A part of the downloaded package&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
Refer to [[Digital Measurement Onboarding]] for more information on how to get a Nielsen App SDK and appid.&lt;br /&gt;
&lt;br /&gt;
== Import Library ==&lt;br /&gt;
Refer to [[Android SDK API Reference#Setting Up Development Environment|Android SDK API Reference - Setting Up Development Environment]] for information on importing libraries.&lt;br /&gt;
* The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: The latest version of App SDK contains only appsdk.jar file and does not feature any native shared libraries like libAppSdk.so.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Initialize SDK ==&lt;br /&gt;
Initialize App SDK as soon as the application is launched. Refer to [[Android SDK API Reference#Initialization|Android SDK API Reference - Initialization]] for details on initializing an AppSDK object and the parameters required.&lt;br /&gt;
&lt;br /&gt;
== Configure and fire API calls ==&lt;br /&gt;
=== Configure API calls - play ===&lt;br /&gt;
Call [[play()]] when starting or resuming a streaming session to pass the channel descriptor information through &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; parameter when the user taps the '''Play''' button on the player.&lt;br /&gt;
* &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; is a 32-character free-form text field containing the name of the program or feed being sent (such as ESPN2, Food Network, etc.)&lt;br /&gt;
Call [[play()]] with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
      &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - loadMetadata ===&lt;br /&gt;
Load the CMS metadata by calling [[loadMetadata|loadMetadata()]] on the SDK object.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;swift&amp;quot;&amp;gt;    loadMetadata(JSONObject jsonMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Refer to [[Digital Measurement Metadata]] for the list of parameters to be passed in the JSON object.&lt;br /&gt;
Call [[loadMetadata()]] for the content after the first [[play()]] call. Call [[loadMetadata()]] with JSON metadata for the active content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
      &amp;quot;adModel&amp;quot;: &amp;quot;1&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure API calls - sendID3 ===&lt;br /&gt;
[[sendID3()]] API is a receiver for HLS timed metadata events (ID3 tags) provided through the notification system. This API filters out Nielsen-specific ID3 tags from the system and buffers the data for transfer to Nielsen’s collection facility. Call [[sendID3()]] whenever new Nielsen ID3 metadata is available for processing during session playback.&lt;br /&gt;
==== Sample ID3 tags ====&lt;br /&gt;
* &amp;lt;code&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/X100zdCIGeIlgZnkYj6UvQ==/AAAB2Jz2_k74GXSzx4npHuI_&amp;lt;wbr /&amp;gt;JwJd3QSUpW30rDkGTcbHEzIMWleCzM-uvNOP9fzJcQMWQLJqzXMCAxParOb5sGijSV9dNM3QiBniJYGZ5GI-lL1fXTTN0IgZ4iWBmeRiPpS9AAAAAAAAAAAAAAAAAAAAAFJWFM5SVhTONNU=/00000/00000/00&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;www.nielsen.com/X100zdCIGeIlgZnkYj6UvQ==/R8WHe7pEBeqBhu8jTeXydg==/AAICoyitYqlxT7n6aZ0oMCGhe&amp;lt;wbr /&amp;gt;Fi4CXFp46AMUPZz1lMr_M9tr3_cjee1SHqxrOiVerMDLeyn9xzocZSKwi746Re8vNOtpNCAZjYABs_J0R25IHpvOc1HS8&amp;lt;wbr /&amp;gt;QHGgD5TgOJeS6gX100zdCIGeIlgZnkYj6UvVJWFNhSVhTiPE0=/00000/46016/00&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': ID3 tags are not applicable for International (Germany)&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Refer to [[Android SDK API Reference#Retrieving ID3 Tags|Android SDK API Reference - Retrieving ID3 Tags]] section to know more details.&lt;br /&gt;
&lt;br /&gt;
===Configure API calls - stop ===&lt;br /&gt;
Call [[stop()]] only when the stream playback is stopped by a user. Common events are; network loss, power / standby, incoming call, alarm, etc. Call [[stop()]] only when buffering continues for 30 seconds (not when it starts). Call [[play()]] when resuming a stream (previously stopped) or starting playback of a new stream.&lt;br /&gt;
&lt;br /&gt;
===Configure API calls - end ===&lt;br /&gt;
Call [[end()]] only at the end of playback. Not mandatory if stream is live/does not end.&lt;br /&gt;
&lt;br /&gt;
==API Call sequence==&lt;br /&gt;
===Use Case 1: Content has no Advertisements===&lt;br /&gt;
Call [[play()]] with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Use Case 2: Content has linear (non-DAI) Advertisements===&lt;br /&gt;
Call [[play()]] (for the first ad) with &amp;lt;code&amp;gt;channelName&amp;lt;/code&amp;gt; JSON as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for the active content as below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;    {&lt;br /&gt;
        &amp;quot;adloadtype&amp;quot;: &amp;quot;1&amp;quot;&lt;br /&gt;
    }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[sendID3()]] with ID3 payload&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
    sendID3(payload)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handling Foreground and Background states of App==&lt;br /&gt;
&lt;br /&gt;
There are two ways of handling the foreground and background states of the client application.&lt;br /&gt;
*Let App SDK handle the app states information (foreground / background) and use it, as necessary.&lt;br /&gt;
*Capture app states through the application and trigger the corresponding API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state. This allows Nielsen App SDK to know the app state.&lt;br /&gt;
&lt;br /&gt;
=== New devices (Android 4.0 and later versions) ===&lt;br /&gt;
&lt;br /&gt;
'''Add ''application'' tag to Manifest XML file'''&lt;br /&gt;
When a client’s app supports only new devices (Android 4.0 and above) and the client has not implemented a custom Application class for some other purpose,&lt;br /&gt;
* Add the following entry (application tag) into the Manifest XML file to use SDK’s state detection feature.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;   &amp;lt;application android:name=&amp;quot;com.nielsen.app.sdk.AppSdkApplication&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This is the custom Application class where the whole background detection implementation is done. No new permissions are required to change the properties in Manifest XML file.&lt;br /&gt;
&lt;br /&gt;
=== Older devices (Android 4.0 or earlier version) ===&lt;br /&gt;
&lt;br /&gt;
Identify the change of state through the application and call the respective API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state (foreground / background). The SDK will use this information to pass the app launch times, etc. to Collection facility.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
AppLaunchMeasurementManager.appInForeground(getApplicationContext());&lt;br /&gt;
AppLaunchMeasurementManager.appInBackground(getApplicationContext());&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interruptions during playback ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call [[stop()]] immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Start sending pings – [[loadMetadata()]] and [[sendID3()]] for the new viewing session, once the playback resumes.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Nielsen Measurement Opt-Out Implementation ==&lt;br /&gt;
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
* When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from [[userOptOutURLString()]]) should be displayed.&lt;br /&gt;
** Use [[getOptOutStatus()]] to retrieve the device’s Opt-Out status.&lt;br /&gt;
* This Opt-out page should be displayed in a webview (within the app) and not in any external browser.&lt;br /&gt;
* Capture the user’s selection in this page and pass it to the SDK through [[userOptOut()]] for Nielsen to save the user’s preference.&lt;br /&gt;
* For more details, refer to [[Android SDK API Reference#Android Opt-Out Implementation|Android SDK API Reference - Android Opt-Out Implementation]] and Nielsen Digital Privacy.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - App ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Android_SDK&amp;diff=2040</id>
		<title>DCR Video Android SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Android_SDK&amp;diff=2040"/>
		<updated>2017-11-08T22:06:50Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adloadtype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the App SDK, the following details are required:&lt;br /&gt;
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.&lt;br /&gt;
* '''Nielsen SDK''' and '''Sample Player''': A part of the downloaded package&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
Refer to [[Digital Measurement Onboarding]] guide for more information on how to get a Nielsen App SDK and appid.&lt;br /&gt;
&lt;br /&gt;
== Import Library ==&lt;br /&gt;
Refer to [[Android SDK API Reference#Setting Up Development Environment|Android SDK API Reference - Setting Up Development Environment]] for information on importing libraries.&lt;br /&gt;
* The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: The latest version of App SDK contains only ''appsdk.jar'' file and does not feature any native shared libraries like ''libAppSdk.so''.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Initialize SDK ==&lt;br /&gt;
Initialize App SDK as soon as the application is launched. Refer to [[Android SDK API Reference#Initialization|Android SDK API Reference - Initialization]] for details on initializing an AppSDK object and the parameters required.&lt;br /&gt;
&lt;br /&gt;
== Configure API calls ==&lt;br /&gt;
=== play ===&lt;br /&gt;
Use [[play()]] to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player.&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata ===&lt;br /&gt;
Use [[loadMetadata()]] to pass 'content' and 'ad' [[Digital Measurement Metadata]]. The CMS data must be passed as a JSON object.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    loadMetadata(JSONObject jsonMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Refer to [[Digital Measurement Metadata]] section for the list of parameters to be passed in the JSON string.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: The [[loadMetadata()]] call after the first [[play()]] call must have 'content' details (&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;). This call should occur before any preroll ad starts playing.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition (Content) ===&lt;br /&gt;
Use [[setPlayheadPosition()]] to pass the position of the playhead while the content is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    public AppSdk setPlayheadPosition(long position)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! # !! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Live** || UTC of the live content || Client-defined || Yes || Seconds since 1970&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Video On Demand (VOD)** || Position taken from beginning of the content in seconds. || Client-defined || Yes || Current player position from beginning of the content.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;Only one of these parameters is mandatory&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: If playhead is not available from audio / video measurement, allow the app to start a timer (1-5 seconds) and send playhead position to SDK based on the timer event. Once the actual playhead is available, let the app send the proper playhead position. This allows the SDK to calculate and provide a closer value for duration.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Buffering state'''&lt;br /&gt;
* Do not supply playhead position while the content is being buffered.&lt;br /&gt;
* If the content is in buffering state continuously for more than 30 seconds, call the [[stop | stop()]] API.&lt;br /&gt;
&lt;br /&gt;
'''Live Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    Calendar c = Calendar.getInstance();&lt;br /&gt;
   long pos = (c.getTimeInMillis()/ 1000);&lt;br /&gt;
   if (mAppSdk != null)&lt;br /&gt;
   {&lt;br /&gt;
     mAppSdk.setPlayheadPosition(pos);&lt;br /&gt;
   }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''On-demand Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    long pos = mPlayer.videoPosition() / 1000;&lt;br /&gt;
   if (mAppSdk != null)&lt;br /&gt;
   {&lt;br /&gt;
     mAppSdk.setPlayheadPosition(pos);&lt;br /&gt;
   }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition (Ad) ===&lt;br /&gt;
Use [[setPlayheadPosition()]] to pass the position of the playhead while the advertisement is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    public AppSdk setPlayheadPosition(long position)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Ad || Position taken from beginning of the ad in seconds || Client-defined || Yes || Seconds since start of the ad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Ad Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    long pos = mAdPlayer.videoPosition() / 1000;&lt;br /&gt;
   if (mAppSdk != null)&lt;br /&gt;
   {&lt;br /&gt;
     mAppSdk.setPlayheadPosition(pos);&lt;br /&gt;
   }&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: The playhead positions for ad and content should be maintained separately.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== stop ===&lt;br /&gt;
Call [[stop | stop()]] only at the end of ad and when the stream playback is stopped by a user or an interruption from another event. Common events are; network loss, power / standby, incoming call, alarm, etc. Call [[stop | stop()]] only when buffering continues for 30 seconds (not when it starts). Call [[loadMetadata()]] and [[setPlayheadPosition()]] when a previously stopped stream resumes. Call [[play | play()]] when starting playback of a new stream.&lt;br /&gt;
&lt;br /&gt;
=== end ===&lt;br /&gt;
Call [[end()]] only at the end of playback.&lt;br /&gt;
&lt;br /&gt;
=== API Call sequence ===&lt;br /&gt;
==== Use Case 1: Content has no Advertisements ====&lt;br /&gt;
Call [[play()]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;vid345-67483&amp;quot;,&lt;br /&gt;
  &amp;quot;program&amp;quot;: &amp;quot;ProgramName&amp;quot;,&lt;br /&gt;
  &amp;quot;title&amp;quot;: &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
  &amp;quot;length&amp;quot;: &amp;quot;3600&amp;quot;,&lt;br /&gt;
  &amp;quot;segB&amp;quot;: &amp;quot;CustomSegmentValueB&amp;quot;,&lt;br /&gt;
  &amp;quot;segC&amp;quot;: &amp;quot;CustomSegmentValueC&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId1&amp;quot;: &amp;quot;Reference11&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId2&amp;quot;: &amp;quot;Reference22&amp;quot;,&lt;br /&gt;
  &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
  &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
  &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
  &amp;quot;progen&amp;quot;:&amp;quot;GV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[setPlayheadPosition()]] every one second until a pause / stop.&lt;br /&gt;
Use the sample API sequence below as a reference to identify the specific events that need to be called during content playback without ads.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;mAppSdk.play(channelName); &amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| Content || &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;mAppSdk.end();&amp;lt;/code&amp;gt; || // Content playback is completed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Use Case 2: Content has Advertisements ====&lt;br /&gt;
Call [[play()]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata()]] with JSON metadata for ad as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
   &amp;quot;assetid&amp;quot;: &amp;quot;ad=123&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: In case the individual ad details are not available, send ad pod (presence) details through the [[loadMetadata]] and playhead position through [[playheadPosition]].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call [[setPlayheadPosition()]] every one second until a pause / stop / another [[loadMetadata()]] is called. Playhead should be passed for the entire duration of ad pod, if the ad pod details are passed as part of [[loadMetadata()]].&lt;br /&gt;
&lt;br /&gt;
The sample API sequence can be used as a reference to identify the specific events that need to be called during content and ad playback.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;mAppSdk.play(channelName); &amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Preroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(prerollMetadataObject);&amp;lt;/code&amp;gt; || // prerollMetadataObject contains the JSON metadata for the preroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the preroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after preroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after the content is paused (ad starts)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;6&amp;quot; | Midroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(midrollMetaDataObject);&amp;lt;/code&amp;gt; || // midrollMetadataObject contains the JSON metadata for the midroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the midroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // App moves to background(midroll pauses) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.loadMetadata(midrollMetaDataObject);&amp;lt;/code&amp;gt; || // App moves to foreground (midroll resumes) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // playheadPosition is position of the playhead while the midroll ad is being played &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after midroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content (End of stream) || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(contentMetaDataObject);&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Always call stop irrespective of postroll is followed or not&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;mAppSdk.end();&amp;lt;/code&amp;gt; || // Call end() at the end of content&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Postroll || &amp;lt;code&amp;gt;mAppSdk.loadMetadata(postrollMetaDataObject);&amp;lt;/code&amp;gt; || // postrollMetadataObject contains the JSON metadata for the postroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.setPlayheadPosition(playheadPosition);&amp;lt;/code&amp;gt; || // position is position of the playhead while the postroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mAppSdk.stop();&amp;lt;/code&amp;gt; || // Call stop after postroll occurs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: Each Ad playhead should reset or begin from 0 at ad start. When content has resumed following an ad break, playhead position must continue from where previous content segment was left off.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Handling Foreground and Background states of App ==&lt;br /&gt;
There are two ways of handling the foreground and background states of the client application.&lt;br /&gt;
* Let App SDK handle the app states information (foreground / background) and use it, as necessary. See [[#New_devices_.28Android_4.0_and_later_versions.29]] for more information.&lt;br /&gt;
* Capture app states through the application and trigger the corresponding API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state. This allows Nielsen App SDK to know the app state. See [[#Older_devices_.28Android_4.0_or_earlier_versions.29]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== New devices (Android 4.0 and later versions) ===&lt;br /&gt;
'''Add ''application'' tag to Manifest XML file'''&lt;br /&gt;
When client's app supports only new devices (Android 4.0 and above) and the client has not implemented a custom Application class for some other purpose,&lt;br /&gt;
* Add the following entry (application tag) into the Manifest XML file to use SDK's state detection feature.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    &amp;lt;application android:name=&amp;quot;com.nielsen.app.sdk.AppSdkApplication&amp;quot;&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This is the custom Application class where the whole background detection implementation is done.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: No new permissions are required to change the properties in Manifest XML file.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Older devices (Android 4.0 or earlier versions) ===&lt;br /&gt;
Identify the change of state through the application and call the respective API ([[appInForeground()]] or [[appInBackground()]]) upon every change of state (foreground / background). The SDK will use this information to pass the app launch times, etc. to Collection facility.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;    AppLaunchMeasurementManager.appInForeground(getApplicationContext());&lt;br /&gt;
    AppLaunchMeasurementManager.appInBackground(getApplicationContext());&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interruptions during playback ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call [[stop()]] immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Start sending pings – [[loadMetadata()]] and [[setPlayheadPosition()]] for the new viewing session, once the playback resumes.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Nielsen Measurement Opt-Out Implementation ==&lt;br /&gt;
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
* When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from [[userOptOutURLString()]]) should be displayed.&lt;br /&gt;
* Use [[getOptOutStatus()]] to retrieve the device's Opt-Out status.&lt;br /&gt;
* This Opt-out page should be displayed in a webview (within the app) and not in any external browser.&lt;br /&gt;
* Capture the user's selection in this page and pass it to the SDK through [[userOptOut()]] for Nielsen to save the user's preference.&lt;br /&gt;
* For more details, refer to [[Android SDK API Reference#Android Opt-Out Implementation|Android SDK API Reference - Android Opt-Out Implementation]] and Nielsen Digital Privacy.&lt;br /&gt;
&lt;br /&gt;
== Pre-Certification Checklists ==&lt;br /&gt;
After the application is ready to be sent for Nielsen Certification, please go through the Pre-Certification Checklist and ensure the app behaves as expected, before submitting to Nielsen.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - App ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_iOS_SDK&amp;diff=2039</id>
		<title>DCR Video iOS SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_iOS_SDK&amp;diff=2039"/>
		<updated>2017-11-08T22:05:45Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adloadtype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the App SDK, the following details are required:&lt;br /&gt;
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.&lt;br /&gt;
* '''Nielsen SDK''' and '''Sample Player''': A part of the downloaded package&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
Refer to [[Digital Measurement Onboarding]] guide for information on how to get a Nielsen App SDK and appid.&lt;br /&gt;
&lt;br /&gt;
== Import Library ==&lt;br /&gt;
Refer to [[iOS SDK API Reference#Importing Frameworks|iOS SDK API Reference - Importing Frameworks]] for information on importing libraries.&lt;br /&gt;
* The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.&lt;br /&gt;
&lt;br /&gt;
== Initialize SDK ==&lt;br /&gt;
Initialize App SDK as soon as the application is launched. Refer to [[iOS SDK API Reference#Initialization|iOS SDK API Reference - Initialization]] for details on initializing an AppSDK object and the parameters required.&lt;br /&gt;
&lt;br /&gt;
== Configure API calls ==&lt;br /&gt;
=== play ===&lt;br /&gt;
Use [[play]] to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player.&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata ===&lt;br /&gt;
Use [[loadMetadata]] to pass 'content' and 'ad' [[Digital Measurement Metadata]]. The CMS data must be passed as a JSON object.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) loadMetadata :(id)metadata;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Refer to [[loadMetadata]] for the list of parameters to be passed in the JSON object.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The [[loadMetadata]] call after the first [[play]] call must have ‘content’ details (&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;). This call should occur before any preroll ad starts playing.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== playheadPosition (Content) ===&lt;br /&gt;
Use [[playheadPosition]] to pass the position of the playhead while the content is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) playheadPosition: (long long) playheadPos&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! # !! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Live** || UTC of the live content || Client-defined || Yes || Seconds since 1970&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Video On Demand (VOD)** || Position taken from beginning of the content in seconds. || Client-defined || Yes || Current player position from beginning of the content.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;''Only one of these parameters is mandatory''&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' If playhead is not available from audio / video measurement, allow the app to start a timer (1-5 seconds) and send playhead position to SDK based on the timer event. Once the actual playhead is available, let the app send the proper playhead position. This allows the SDK to calculate and provide a closer value for duration.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Buffering state'''&lt;br /&gt;
* Do not supply playhead position while the content is being buffered.&lt;br /&gt;
* If the content is in buffering state continuously for more than 30 seconds, call [[stop]] API.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Live Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    long long pos = [[NSDate date] timeIntervalSince1970];&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''On-demand Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    CMTime curTime=[player currentTime];&lt;br /&gt;
    long pos=CMTimeGetSeconds(curTime);&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== playheadPosition (Ad) ===&lt;br /&gt;
Use [[playheadPosition]] to pass the position of the playhead while the advertisement is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) playheadPosition: (long long) playheadPos&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Ad || Position taken from beginning of the ad in seconds || Client-defined || Yes || Seconds since tart of the ad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Ad Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    CMTime curTime=[adplayer currentTime];&lt;br /&gt;
    long pos=CMTimeGetSeconds(curTime);&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The playhead positions for ad and content should be maintained separately.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== stop ===&lt;br /&gt;
[[stop]] must be called on the following events:&lt;br /&gt;
* At the end of ad&lt;br /&gt;
* In case of interruptions during playback like flight mode, Wi-Fi toggle, etc. &lt;br /&gt;
&lt;br /&gt;
Call [[loadMetadata]] and [[playheadPosition]] when the stream resumes. &lt;br /&gt;
&lt;br /&gt;
Call [[play]] when starting the new stream.&lt;br /&gt;
&lt;br /&gt;
=== end ===&lt;br /&gt;
[[end]] must be called on the following events: &lt;br /&gt;
*End of playback &lt;br /&gt;
*Channel change&lt;br /&gt;
&lt;br /&gt;
=== API Call sequence ===&lt;br /&gt;
==== Use Case 1: Content has no Advertisements ====&lt;br /&gt;
Use the sample API sequence below as a reference to identify the specific events that need to be called during content playback without ads.&lt;br /&gt;
&lt;br /&gt;
Call [[play]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata]] with JSON metadata for content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;vid345-67483&amp;quot;,&lt;br /&gt;
  &amp;quot;program&amp;quot;: &amp;quot;ProgramName&amp;quot;,&lt;br /&gt;
  &amp;quot;title&amp;quot;: &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
  &amp;quot;length&amp;quot;: &amp;quot;3600&amp;quot;,&lt;br /&gt;
  &amp;quot;segB&amp;quot;: &amp;quot;CustomSegmentValueB&amp;quot;,&lt;br /&gt;
  &amp;quot;segC&amp;quot;: &amp;quot;CustomSegmentValueC&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId1&amp;quot;: &amp;quot;Reference11&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId2&amp;quot;: &amp;quot;Reference22&amp;quot;,&lt;br /&gt;
  &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
  &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
  &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
  &amp;quot;progen&amp;quot;:&amp;quot;GV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[playheadPosition]] every one second until a pause / stop.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;[nielsenMeter play: channelName];&amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| Content || &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // playheadPosition is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;[nielsenMeter end];&amp;lt;/code&amp;gt; || // Content playback is completed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Use Case 2: Content has Advertisements ====&lt;br /&gt;
Call [[play]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata]] with JSON metadata for ad as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
   &amp;quot;assetid&amp;quot;: &amp;quot;ad=123&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: In case the individual ad details are not available, send ad pod (presence) details through the [[loadMetadata]] and playhead position through [[playheadPosition]].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call [[playheadPosition]] every one second until a pause / stop / another ''loadMetadata'' is called. Playhead should be passed for the entire duration of ad pod, if the ad pod details are passed as part of [[loadMetadata]].&lt;br /&gt;
&lt;br /&gt;
The sample API sequence can be used as a reference to identify the specific events that need to be called during content and ad playback.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;[nielsenMeter play: channelName];&amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Preroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: prerollMetadataObject];&amp;lt;/code&amp;gt; || // prerollMetadataObject contains the JSON metadata for the preroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the preroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after preroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after the content is paused (ad starts)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Midroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: midrollMetadataObject];&amp;lt;/code&amp;gt; || // midrollMetadataObject contains the JSON metadata for the midroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the midroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after midroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content (End of stream) || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter end];&amp;lt;/code&amp;gt; || // Called at the end of content&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Postroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: postrollMetadataObject];&amp;lt;/code&amp;gt; || // postrollMetadataObject contains the JSON metadata for the postroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the postroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after postroll occurs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' Each Ad playhead should reset or begin from 0 at ad start. When content has resumed following an ad break, playhead position must continue from where previous content segment was left off.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interruptions during playback ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call [[stop]] immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Start sending pings – [[loadMetadata]] and [[playheadPosition]] for the new viewing session, once the playback resumes.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Nielsen Measurement Opt-Out Implementation ==&lt;br /&gt;
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
* When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from [[optOutURL]]) should be displayed.&lt;br /&gt;
* Use [[optOutStatus]] to retrieve the device’s Opt-Out status.&lt;br /&gt;
* This Opt-out page should be displayed in a webview (within the app) and not in any external browser.&lt;br /&gt;
* (For SDK Version 5.1.1.17 or below) Capture the user’s selection in this page and pass it to the SDK through [[userOptOut]] for Nielsen to save the user’s preference.&lt;br /&gt;
* (For SDK Version 5.1.1.18 or above) Opt-out is controlled by the Limit Ad Tracking setting on the user's device. There is no need to capture any user selection on the opt-out page.&lt;br /&gt;
&amp;lt;!-- * For more details, refer to [[iOS SDK API Reference#iOS Opt-Out Implementation|iOS SDK API Reference - iOS Opt-Out Implementation]] and Nielsen Digital Privacy. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-Certification Checklists ==&lt;br /&gt;
After the application is ready to be sent for Nielsen Certification, please go through the [[Digital Pre-Certification Checklist App SDK]] and ensure the app behaves as expected, before submitting to Nielsen.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - App ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=2038</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=2038"/>
		<updated>2017-11-08T22:04:34Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adloadtype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&lt;br /&gt;
=== Static Queue Snippet ===&lt;br /&gt;
Add the following script tag to the website:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
!function(t,n)&lt;br /&gt;
{&lt;br /&gt;
  t[n]=t[n]||&lt;br /&gt;
  {&lt;br /&gt;
    nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
     return s=t.document,&lt;br /&gt;
     r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
     r.async=1,&lt;br /&gt;
     r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
     i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
     i.parentNode.insertBefore(r,i),&lt;br /&gt;
     t[n][o]=t[n][o]||{g:c||{},&lt;br /&gt;
     ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Create SDK Instance===&lt;br /&gt;
To initialize the SDK, create an SDK instance by making the initialization call:&lt;br /&gt;
&lt;br /&gt;
==== Initialization API Call ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
NOLBUNDLE.nlsQ(&amp;quot;&amp;lt;apid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;instanceName&amp;gt;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When creating an instance, pass the following three values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter	!! Description	!! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid	|| Unique ID assigned to player/site ||	'PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&lt;br /&gt;
|-&lt;br /&gt;
|instanceName ||	Name of SDK instance ||	&amp;quot;any string value&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug	|| Enables Nielsen console logging. Only required for testing	|| &amp;quot;{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example SDK Initialization ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static configuration file, &amp;lt;apid&amp;gt;.js, will be downloaded based on the apid and will be cached on the user’s browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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”.&lt;br /&gt;
&lt;br /&gt;
=== Example SDK Configuration ===&lt;br /&gt;
&lt;br /&gt;
The configuration should include the Static Queue Snippet and an SDK Instance for an unique App ID as shown in the example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
{&lt;br /&gt;
  t[n]=t[n]||&lt;br /&gt;
  {&lt;br /&gt;
    nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
     return s=t.document,&lt;br /&gt;
     r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
     r.async=1,&lt;br /&gt;
     r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
     i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
     i.parentNode.insertBefore(r,i),&lt;br /&gt;
     t[n][o]=t[n][o]||{g:c||{},&lt;br /&gt;
     ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;myPlayerName&amp;quot;, {clientid: &amp;quot;it-123456&amp;quot;, vcid: &amp;quot;c01&amp;quot;, nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Metadata Objects ===&lt;br /&gt;
There are two types of asset metadata:&lt;br /&gt;
*content: identify video&lt;br /&gt;
*ad: identify each ad&lt;br /&gt;
&lt;br /&gt;
The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Content Metadata ====&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| clientid	|| &lt;br /&gt;
parent ID – value is automatically populated through provided App ID.&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to override the brand configured to the App ID, pass parent &amp;lt;br/&amp;gt;&lt;br /&gt;
value here and the sub-brand ID associated to that brand in the subbrand &amp;lt;br/&amp;gt;&lt;br /&gt;
key (e.g. multiple brands in App)	&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| vcid	|| sub-brand ID – value is automatically populated through provided&amp;lt;br/&amp;gt;&lt;br /&gt;
App ID. In order to override the sub-brand configured to the App ID, value can &amp;lt;br/&amp;gt;&lt;br /&gt;
be passed here (e.g. multiple sub-brands in App)&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| type ||	type of asset	|| &amp;quot;content&amp;quot;	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid	|| unique ID assigned to asset	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| program	|| name of program (25 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| title	|| episode title (40 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| length	|| length of content in seconds	|| seconds (86400 for live stream)||	✓&lt;br /&gt;
|-&lt;br /&gt;
| mediaURL	|| URL location of the content being streamed	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| segB	|| custom segment B	|| custom	||&lt;br /&gt;
|-&lt;br /&gt;
| segC	|| custom segment C	|| custom	 ||&lt;br /&gt;
|-&lt;br /&gt;
| airdate	|| the airdate in the linear TV ||	YYYYMMDD HH:MI:SS	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode	|| full episode flag ||	&lt;br /&gt;
*&amp;quot;y&amp;quot;– full episode&lt;br /&gt;
*&amp;quot;n&amp;quot;– non full episode	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId1	|| standard episode ID	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId2	|| content originator (only required for distributors)	|| Nielsen provided	||&lt;br /&gt;
|-&lt;br /&gt;
|adloadtype	|| type of ad load:&lt;br /&gt;
* 1) - Linear – matches TV ad load &lt;br /&gt;
* 2) Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
||&lt;br /&gt;
*&amp;quot;1&amp;quot; – content with linear ads &lt;br /&gt;
*&amp;quot;2&amp;quot; – content with dynamic ads	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Content Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var contentMetadataObject =&lt;br /&gt;
{  &lt;br /&gt;
  type:           'content',&lt;br /&gt;
  assetid:        'VID123-123456',&lt;br /&gt;
  program:        'program name',&lt;br /&gt;
  title:          'episode title',&lt;br /&gt;
  length:         'length in seconds',&lt;br /&gt;
  mediaURL:       'http://www.site.com/videoAsset',&lt;br /&gt;
  segB:           'custom segment B',&lt;br /&gt;
  segC:           'custom segment C',&lt;br /&gt;
  airdate:        'YYYYMMDD HH:MI:SS',&lt;br /&gt;
  isfullepisode:  'y',&lt;br /&gt;
  crossId1:       'Standard Episode ID',&lt;br /&gt;
  crossId2:       'Content Originator',&lt;br /&gt;
  adloadtype:     '2'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ad Metadata Object ===&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type	|| type of ad	|| 'preroll', 'midroll', or 'postroll' ||	✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to ad	|| custom	|| ✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Ad Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var adMetadataObject = &lt;br /&gt;
{  &lt;br /&gt;
  assetid: 'AD-1',&lt;br /&gt;
  type:    'preroll'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt; 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. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Call Nielsen APIs ====&lt;br /&gt;
The method for calling events is ggPM().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Other Interrupt Scenarios ===&lt;br /&gt;
The following possible browser interruption scenarios must be handled:&lt;br /&gt;
&lt;br /&gt;
* Browser/Tab close&lt;br /&gt;
* Leaving the page to another destination&lt;br /&gt;
* Pressing the stop button&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
window.addEventListener('beforeunload', function(event) &lt;br /&gt;
{&lt;br /&gt;
  // Only inside a midroll indicate &amp;lt;stop&amp;gt; for the ad&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
  &lt;br /&gt;
  // Indicate &amp;lt;end&amp;gt; and &amp;lt;stop&amp;gt; for the content&lt;br /&gt;
  nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' User may need to add code to support specific browser versions (e.g. older versions of Internet Explorer).&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Events ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !!	Parameter	!! Description&lt;br /&gt;
|-&lt;br /&gt;
| 'loadMetadata'	|| content/ad metadata object	|| Needs to be called at the beginning of each asset&lt;br /&gt;
|-&lt;br /&gt;
| 'setPlayheadPosition'	|| playhead position as integer&amp;lt;br/&amp;gt;&lt;br /&gt;
VOD: || current position in seconds &amp;lt;br/&amp;gt;&lt;br /&gt;
Live: current UTC timestamp &amp;lt;br/&amp;gt;&lt;br /&gt;
Note: 'setPlayheadPosition' has to be called every second&lt;br /&gt;
||&lt;br /&gt;
Pass playhead position every second during playback&lt;br /&gt;
|-&lt;br /&gt;
| 'stop' ||	playhead position	|| Call when content or ads complete playing and pass playhead position&lt;br /&gt;
|-&lt;br /&gt;
| 'end'	|| playhead position in seconds	|| Call when the current video asset completes playback and pass the playhead position. &amp;lt;br/&amp;gt;&lt;br /&gt;
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SDK Playhead Event Sequence ==&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// START OF STREAM&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject); &lt;br /&gt;
 &lt;br /&gt;
// PREROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', prerollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', midrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// POSTROLL&lt;br /&gt;
nSdkInstance.ggPM('loadmetadata', postrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
* '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'.&lt;br /&gt;
&lt;br /&gt;
* For Ad Pods, events must be called for each individual Ad. Each Ad playhead position should begin at ‘0’ when ad starts.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nielsen Opt-Out ==&lt;br /&gt;
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.&lt;br /&gt;
*A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings).&lt;br /&gt;
*A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Opt Back In ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Going Live ===&lt;br /&gt;
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.&lt;br /&gt;
Disable debug logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call.&lt;br /&gt;
Example Production Initialization Call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=2037</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=2037"/>
		<updated>2017-11-08T22:04:11Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: adloadtype&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&lt;br /&gt;
=== Static Queue Snippet ===&lt;br /&gt;
Add the following script tag to the website:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
!function(t,n)&lt;br /&gt;
{&lt;br /&gt;
  t[n]=t[n]||&lt;br /&gt;
  {&lt;br /&gt;
    nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
     return s=t.document,&lt;br /&gt;
     r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
     r.async=1,&lt;br /&gt;
     r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
     i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
     i.parentNode.insertBefore(r,i),&lt;br /&gt;
     t[n][o]=t[n][o]||{g:c||{},&lt;br /&gt;
     ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Create SDK Instance===&lt;br /&gt;
To initialize the SDK, create an SDK instance by making the initialization call:&lt;br /&gt;
&lt;br /&gt;
==== Initialization API Call ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
NOLBUNDLE.nlsQ(&amp;quot;&amp;lt;apid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;instanceName&amp;gt;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When creating an instance, pass the following three values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter	!! Description	!! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid	|| Unique ID assigned to player/site ||	'PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&lt;br /&gt;
|-&lt;br /&gt;
|instanceName ||	Name of SDK instance ||	&amp;quot;any string value&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug	|| Enables Nielsen console logging. Only required for testing	|| &amp;quot;{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example SDK Initialization ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static configuration file, &amp;lt;apid&amp;gt;.js, will be downloaded based on the apid and will be cached on the user’s browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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”.&lt;br /&gt;
&lt;br /&gt;
=== Example SDK Configuration ===&lt;br /&gt;
&lt;br /&gt;
The configuration should include the Static Queue Snippet and an SDK Instance for an unique App ID as shown in the example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
{&lt;br /&gt;
  t[n]=t[n]||&lt;br /&gt;
  {&lt;br /&gt;
    nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
     return s=t.document,&lt;br /&gt;
     r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
     r.async=1,&lt;br /&gt;
     r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
     i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
     i.parentNode.insertBefore(r,i),&lt;br /&gt;
     t[n][o]=t[n][o]||{g:c||{},&lt;br /&gt;
     ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;myPlayerName&amp;quot;, {clientid: &amp;quot;it-123456&amp;quot;, vcid: &amp;quot;c01&amp;quot;, nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Metadata Objects ===&lt;br /&gt;
There are two types of asset metadata:&lt;br /&gt;
*content: identify video&lt;br /&gt;
*ad: identify each ad&lt;br /&gt;
&lt;br /&gt;
The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Content Metadata ====&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| clientid	|| &lt;br /&gt;
parent ID – value is automatically populated through provided App ID.&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to override the brand configured to the App ID, pass parent &amp;lt;br/&amp;gt;&lt;br /&gt;
value here and the sub-brand ID associated to that brand in the subbrand &amp;lt;br/&amp;gt;&lt;br /&gt;
key (e.g. multiple brands in App)	&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| vcid	|| sub-brand ID – value is automatically populated through provided&amp;lt;br/&amp;gt;&lt;br /&gt;
App ID. In order to override the sub-brand configured to the App ID, value can &amp;lt;br/&amp;gt;&lt;br /&gt;
be passed here (e.g. multiple sub-brands in App)&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| type ||	type of asset	|| &amp;quot;content&amp;quot;	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid	|| unique ID assigned to asset	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| program	|| name of program (25 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| title	|| episode title (40 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| length	|| length of content in seconds	|| seconds (86400 for live stream)||	✓&lt;br /&gt;
|-&lt;br /&gt;
| mediaURL	|| URL location of the content being streamed	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| segB	|| custom segment B	|| custom	||&lt;br /&gt;
|-&lt;br /&gt;
| segC	|| custom segment C	|| custom	 ||&lt;br /&gt;
|-&lt;br /&gt;
| airdate	|| the airdate in the linear TV ||	YYYYMMDD HH:MI:SS	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode	|| full episode flag ||	&lt;br /&gt;
*&amp;quot;y&amp;quot;– full episode&lt;br /&gt;
*&amp;quot;n&amp;quot;– non full episode	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId1	|| standard episode ID	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId2	|| content originator (only required for distributors)	|| Nielsen provided	||&lt;br /&gt;
|-&lt;br /&gt;
|adloadtype	|| type of ad load:&lt;br /&gt;
* 1) - Linear – matches TV ad load &lt;br /&gt;
* 2) Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
||&lt;br /&gt;
*&amp;quot;1&amp;quot; – content with linear ads &lt;br /&gt;
*&amp;quot;2&amp;quot; – content with dynamic ads	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Content Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var contentMetadataObject =&lt;br /&gt;
{  &lt;br /&gt;
  type:           'content',&lt;br /&gt;
  assetid:        'VID123-123456',&lt;br /&gt;
  program:        'program name',&lt;br /&gt;
  title:          'episode title',&lt;br /&gt;
  length:         'length in seconds',&lt;br /&gt;
  mediaURL:       'http://www.site.com/videoAsset',&lt;br /&gt;
  segB:           'custom segment B',&lt;br /&gt;
  segC:           'custom segment C',&lt;br /&gt;
  airdate:        'YYYYMMDD HH:MI:SS',&lt;br /&gt;
  isfullepisode:  'y',&lt;br /&gt;
  crossId1:       'Standard Episode ID',&lt;br /&gt;
  crossId2:       'Content Originator',&lt;br /&gt;
  admodel:     '2'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ad Metadata Object ===&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type	|| type of ad	|| 'preroll', 'midroll', or 'postroll' ||	✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to ad	|| custom	|| ✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Ad Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var adMetadataObject = &lt;br /&gt;
{  &lt;br /&gt;
  assetid: 'AD-1',&lt;br /&gt;
  type:    'preroll'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt; 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. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Call Nielsen APIs ====&lt;br /&gt;
The method for calling events is ggPM().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Other Interrupt Scenarios ===&lt;br /&gt;
The following possible browser interruption scenarios must be handled:&lt;br /&gt;
&lt;br /&gt;
* Browser/Tab close&lt;br /&gt;
* Leaving the page to another destination&lt;br /&gt;
* Pressing the stop button&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
window.addEventListener('beforeunload', function(event) &lt;br /&gt;
{&lt;br /&gt;
  // Only inside a midroll indicate &amp;lt;stop&amp;gt; for the ad&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
  &lt;br /&gt;
  // Indicate &amp;lt;end&amp;gt; and &amp;lt;stop&amp;gt; for the content&lt;br /&gt;
  nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' User may need to add code to support specific browser versions (e.g. older versions of Internet Explorer).&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Events ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !!	Parameter	!! Description&lt;br /&gt;
|-&lt;br /&gt;
| 'loadMetadata'	|| content/ad metadata object	|| Needs to be called at the beginning of each asset&lt;br /&gt;
|-&lt;br /&gt;
| 'setPlayheadPosition'	|| playhead position as integer&amp;lt;br/&amp;gt;&lt;br /&gt;
VOD: || current position in seconds &amp;lt;br/&amp;gt;&lt;br /&gt;
Live: current UTC timestamp &amp;lt;br/&amp;gt;&lt;br /&gt;
Note: 'setPlayheadPosition' has to be called every second&lt;br /&gt;
||&lt;br /&gt;
Pass playhead position every second during playback&lt;br /&gt;
|-&lt;br /&gt;
| 'stop' ||	playhead position	|| Call when content or ads complete playing and pass playhead position&lt;br /&gt;
|-&lt;br /&gt;
| 'end'	|| playhead position in seconds	|| Call when the current video asset completes playback and pass the playhead position. &amp;lt;br/&amp;gt;&lt;br /&gt;
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SDK Playhead Event Sequence ==&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// START OF STREAM&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject); &lt;br /&gt;
 &lt;br /&gt;
// PREROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', prerollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', midrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// POSTROLL&lt;br /&gt;
nSdkInstance.ggPM('loadmetadata', postrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
* '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'.&lt;br /&gt;
&lt;br /&gt;
* For Ad Pods, events must be called for each individual Ad. Each Ad playhead position should begin at ‘0’ when ad starts.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nielsen Opt-Out ==&lt;br /&gt;
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.&lt;br /&gt;
*A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings).&lt;br /&gt;
*A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Opt Back In ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Going Live ===&lt;br /&gt;
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.&lt;br /&gt;
Disable debug logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call.&lt;br /&gt;
Example Production Initialization Call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1710</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1710"/>
		<updated>2017-10-04T19:00:38Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: debug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;nol_sdkDebug: &amp;quot;debug&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1709</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1709"/>
		<updated>2017-10-04T18:56:44Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1708</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1708"/>
		<updated>2017-10-04T18:48:52Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1707</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1707"/>
		<updated>2017-10-04T18:47:03Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1706</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1706"/>
		<updated>2017-10-04T18:46:42Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: deleted&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1705</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1705"/>
		<updated>2017-10-04T18:46:00Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: &amp;lt;br&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1704</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1704"/>
		<updated>2017-10-04T18:45:31Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: global&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK While Passing The Global Parameters&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1703</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1703"/>
		<updated>2017-10-04T18:44:48Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: &amp;lt;br&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1702</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1702"/>
		<updated>2017-10-04T18:44:35Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: DCR&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1701</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1701"/>
		<updated>2017-10-04T18:44:07Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1700</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1700"/>
		<updated>2017-10-04T18:43:39Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: VHL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1699</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1699"/>
		<updated>2017-10-04T18:41:45Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: infinite scroll&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;i.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1698</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1698"/>
		<updated>2017-10-04T18:40:34Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: br&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1697</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1697"/>
		<updated>2017-10-04T18:40:11Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
i.ggInitialize(_nolggGlobalParams);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has five parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Nielsen Server Designation || 'dcr'&lt;br /&gt;
|-&lt;br /&gt;
| nsdkv || Nielsen SDK version || '511'&lt;br /&gt;
|-&lt;br /&gt;
| apn || Name of App || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1696</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1696"/>
		<updated>2017-10-04T18:37:25Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1695</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1695"/>
		<updated>2017-10-04T18:36:54Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1694</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1694"/>
		<updated>2017-10-04T18:33:57Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: d&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
     apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;,&lt;br /&gt;
     sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
     nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
     apn: &amp;quot;Static-VHL&amp;quot;,&lt;br /&gt;
     nol_sdkDebug: &amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
The Adobe VHL Library 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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
While creating an SDK instance, initialize the SDK by calling:&lt;br /&gt;
&lt;br /&gt;
'''Initialization API Call'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static config file, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;.js&amp;lt;/code&amp;gt;, will be downloaded based on the &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; and cached by the client-side browser(s).&lt;br /&gt;
&lt;br /&gt;
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:&lt;br /&gt;
&amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''staticstart Event'''&lt;br /&gt;
&lt;br /&gt;
There is only one event call required:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1693</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1693"/>
		<updated>2017-10-04T18:33:21Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: .&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
                                apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;, &lt;br /&gt;
			        sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
				nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
				apn:&amp;quot;Static-VHL&amp;quot;, &lt;br /&gt;
				nol_sdkDebug:&amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
The Adobe VHL Library 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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
While creating an SDK instance, initialize the SDK by calling:&lt;br /&gt;
&lt;br /&gt;
'''Initialization API Call'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static config file, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;.js&amp;lt;/code&amp;gt;, will be downloaded based on the &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; and cached by the client-side browser(s).&lt;br /&gt;
&lt;br /&gt;
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:&lt;br /&gt;
&amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''staticstart Event'''&lt;br /&gt;
&lt;br /&gt;
There is only one event call required:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1692</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1692"/>
		<updated>2017-10-04T18:32:54Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static if video measurement is also enabled on the same page&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
                                apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;, &lt;br /&gt;
			        sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
				nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
				apn:&amp;quot;Static-VHL&amp;quot;, &lt;br /&gt;
				nol_sdkDebug:&amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
The Adobe VHL Library 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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
While creating an SDK instance, initialize the SDK by calling:&lt;br /&gt;
&lt;br /&gt;
'''Initialization API Call'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static config file, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;.js&amp;lt;/code&amp;gt;, will be downloaded based on the &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; and cached by the client-side browser(s).&lt;br /&gt;
&lt;br /&gt;
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:&lt;br /&gt;
&amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''staticstart Event'''&lt;br /&gt;
&lt;br /&gt;
There is only one event call required:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1691</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1691"/>
		<updated>2017-10-04T18:32:31Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: Updating VHL Guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Adobe DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&amp;lt;script&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // A second SDK instance must be created specifically for static if video measurement is also enabled on the same page&lt;br /&gt;
 var i = NOLSDK.getInstance('mynewinstance');&lt;br /&gt;
&lt;br /&gt;
 //The Required Nielsen Global Parameters Must Be Established&lt;br /&gt;
 var _nolggGlobalParams = {&lt;br /&gt;
                                apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX&amp;quot;, &lt;br /&gt;
			        sfcode: &amp;quot;dcr&amp;quot;,&lt;br /&gt;
				nsdkv: &amp;quot;511&amp;quot;,&lt;br /&gt;
				apn:&amp;quot;Static-VHL&amp;quot;, &lt;br /&gt;
				nol_sdkDebug:&amp;quot;DEBUG&amp;quot;&lt;br /&gt;
 };&lt;br /&gt;
  &lt;br /&gt;
 //You Can Now Initialize The SDK&lt;br /&gt;
 i.ggInitialize(_nolggGlobalParams);&lt;br /&gt;
&lt;br /&gt;
  // Create Content Metadata Object&lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  i.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Adobe VHL Library JS&lt;br /&gt;
* Create SDK Instance&lt;br /&gt;
* Setup Global Parameters&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
The Adobe VHL Library 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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script src=&amp;quot;script/lib/VideoHeartbeat.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
While creating an SDK instance, initialize the SDK by calling:&lt;br /&gt;
&lt;br /&gt;
'''Initialization API Call'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static config file, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;.js&amp;lt;/code&amp;gt;, will be downloaded based on the &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; and cached by the client-side browser(s).&lt;br /&gt;
&lt;br /&gt;
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:&lt;br /&gt;
&amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''staticstart Event'''&lt;br /&gt;
&lt;br /&gt;
There is only one event call required:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1690</id>
		<title>DCR Static VHL</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Static_VHL&amp;diff=1690"/>
		<updated>2017-10-04T18:17:24Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: VHL Static Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
'''Prior Version Guide:''' [[DCR Static Browser SDK (5.1.1)|5.1.1]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Implementation Steps ==&lt;br /&gt;
=== Add Tracking Code ===&lt;br /&gt;
The Nielsen DCR Tracking Code must be added to each page.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&amp;lt;script&amp;gt;&lt;br /&gt;
  // Static Queue Snippet&lt;br /&gt;
!function(t,n){t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i){return s=t.document,r=s.createElement(&amp;quot;script&amp;quot;),r.async=1,r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],i.parentNode.insertBefore(r,i),t[n][o]=t[n][o]||{g:c||{},ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]}}}(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // SDK Initialization&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
  &lt;br /&gt;
  // Content Metadata &lt;br /&gt;
  var nielsenMetadata = {&lt;br /&gt;
    type: 'static', &lt;br /&gt;
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**&lt;br /&gt;
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**&lt;br /&gt;
    segA: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segB: '', // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    segC: ''  // *DYNAMIC METADATA*: custom segment&lt;br /&gt;
    }; &lt;br /&gt;
    &lt;br /&gt;
  // Event 'staticstart' Call&lt;br /&gt;
  nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&lt;br /&gt;
&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Tracking Code Components ====&lt;br /&gt;
The tracking code includes&lt;br /&gt;
* Static Queue Snippet&lt;br /&gt;
* SDK Initialization&lt;br /&gt;
* Content Metadata&lt;br /&gt;
* staticstart Event&lt;br /&gt;
&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
!function(t,n){t[n]=t[n]||&lt;br /&gt;
{&lt;br /&gt;
  nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
      return s=t.document,&lt;br /&gt;
      r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
      r.async=1,&lt;br /&gt;
      r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],i.parentNode.insertBefore(r,i),&lt;br /&gt;
      t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},t[o]}&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
While creating an SDK instance, initialize the SDK by calling:&lt;br /&gt;
&lt;br /&gt;
'''Initialization API Call'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static config file, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;.js&amp;lt;/code&amp;gt;, will be downloaded based on the &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; and cached by the client-side browser(s).&lt;br /&gt;
&lt;br /&gt;
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:&lt;br /&gt;
&amp;quot;nlsSDK600.bundle.min.js&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Content Metadata'''&lt;br /&gt;
&lt;br /&gt;
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.&lt;br /&gt;
&lt;br /&gt;
Pass dynamic metadata for the keys with the &amp;lt;code&amp;gt;&amp;lt;metadataPlaceholder&amp;gt;&amp;lt;/code&amp;gt; value (e.g. &amp;lt;code&amp;gt;section: ''&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''staticstart Event'''&lt;br /&gt;
&lt;br /&gt;
There is only one event call required:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;staticstart&amp;quot;, nielsenMetadata);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].&lt;br /&gt;
&lt;br /&gt;
=== Pass App ID in Initialization Call ===&lt;br /&gt;
Pass the unique App ID in the first parameter of the initialization call, &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Initialization'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The initialization call has three parameters:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid || Unique ID assigned to player/site. || &amp;lt;code&amp;gt;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || Name of SDK instance || Any string value&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug: &amp;quot;debug&amp;quot; || Enables Nielsen console logging. Only required for testing || &amp;lt;code&amp;gt;{nol_sdkDebug: &amp;quot;debug&amp;quot;}&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Update &amp;lt;code&amp;gt;&amp;lt;apid&amp;gt;&amp;lt;/code&amp;gt; with the AppID provided. Refer to the [[#Going_Live|Going Live]] section to know about updating the AppID to production after testing is completed.&lt;br /&gt;
&lt;br /&gt;
=== Configure Metadata ===&lt;br /&gt;
Map the Nielsen keys to variables so that the content metadata is dynamically updated.&lt;br /&gt;
&lt;br /&gt;
The Nielsen reserved keys are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Data Type !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| type || asset type || fixed || &amp;lt;code&amp;gt;'static'&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Unique ID for each article || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segA || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No&lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B &amp;amp; C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.&lt;br /&gt;
&lt;br /&gt;
'''Aggregation Limits'''&lt;br /&gt;
There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Aggregation Limit&lt;br /&gt;
|-&lt;br /&gt;
| section || maximum of 25 unique values (section &amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segA || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segB || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|-&lt;br /&gt;
| segC || Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC&amp;lt;= 25)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
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&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''Opt Back In'''&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Infinite Scrolling ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will refire the view ping with the existing/original metadata.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;nSdkInstance.ggPM(&amp;quot;onPaginate&amp;quot;, scrolloffset);&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
!width=&amp;quot;23%&amp;quot;| Parameter&lt;br /&gt;
!width=&amp;quot;19%&amp;quot;| Description&lt;br /&gt;
|-&lt;br /&gt;
| event&lt;br /&gt;
| &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| scrolloffset&lt;br /&gt;
| The &amp;lt;code&amp;gt;scrolloffset&amp;lt;/code&amp;gt; value should be the y-scroll position:&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== onPaginate ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;onPageinate&amp;lt;/code&amp;gt; is a slightly modified version of &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; to enable tracking of user’s focus in pages with continuous scrolling. &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event provides the same behavior as &amp;lt;code&amp;gt;staticstart&amp;lt;/code&amp;gt; keeping it local to only clients who wish to implement continuous scrolling. (Note: This event &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; will not reset the page duration timer.)&lt;br /&gt;
&lt;br /&gt;
* The maximum number of static View pings allowed per session is ‘1’. This is enforced via the &amp;lt;code&amp;gt;nol_maxPingCount&amp;lt;/code&amp;gt; parameter in the tag and the cadence of impression.&lt;br /&gt;
* When an &amp;lt;code&amp;gt;onPaginate&amp;lt;/code&amp;gt; event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next &amp;lt;code&amp;gt;staticPosition&amp;lt;/code&amp;gt; event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.&lt;br /&gt;
&lt;br /&gt;
[[File:StaticPageEvent35.jpg|center|link=]]&lt;br /&gt;
&lt;br /&gt;
== Going Live ==&lt;br /&gt;
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.&lt;br /&gt;
# '''App ID''': Ensure that correct &amp;lt;apid&amp;gt; is used during initialization&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# '''Debug Logging''': Disable logging by deleting &amp;lt;code&amp;gt;{nol_sdkDebug: 'DEBUG'}&amp;lt;/code&amp;gt; from initialization call.&lt;br /&gt;
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1679</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1679"/>
		<updated>2017-10-02T18:09:51Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: added stop() call&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&lt;br /&gt;
=== Static Queue Snippet ===&lt;br /&gt;
Add the following script tag to the website:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
!function(t,n)&lt;br /&gt;
{&lt;br /&gt;
  t[n]=t[n]||&lt;br /&gt;
  {&lt;br /&gt;
    nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
    {&lt;br /&gt;
     return s=t.document,&lt;br /&gt;
     r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
     r.async=1,&lt;br /&gt;
     r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
     i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
     i.parentNode.insertBefore(r,i),&lt;br /&gt;
     t[n][o]=t[n][o]||{g:c||{},&lt;br /&gt;
     ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Create SDK Instance===&lt;br /&gt;
To initialize the SDK, create an SDK instance by making the initialization call:&lt;br /&gt;
&lt;br /&gt;
==== Initialization API Call ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
NOLBUNDLE.nlsQ(&amp;quot;&amp;lt;apid&amp;gt;&amp;quot;, &amp;quot;&amp;lt;instanceName&amp;gt;&amp;quot;,{nol_sdkDebug: &amp;quot;debug&amp;quot;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When creating an instance, pass the following three values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter	!! Description	!! Values&lt;br /&gt;
|-&lt;br /&gt;
| apid	|| Unique ID assigned to player/site ||	'PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'&lt;br /&gt;
|-&lt;br /&gt;
|instanceName ||	Name of SDK instance ||	&amp;quot;any string value&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug	|| Enables Nielsen console logging. Only required for testing	|| &amp;quot;{nol_sdkDebug: &amp;quot;debug&amp;quot;})&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example SDK Initialization ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the initialization call is made, a unique static configuration file, &amp;lt;apid&amp;gt;.js, will be downloaded based on the apid and will be cached on the user’s browser.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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”.&lt;br /&gt;
&lt;br /&gt;
==== Example SDK Configuration ====&lt;br /&gt;
The configuration should include the Static Queue Snippet and an SDK Instance for an unique App ID as shown in the example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Metadata Objects ===&lt;br /&gt;
There are two types of asset metadata:&lt;br /&gt;
*content: identify video&lt;br /&gt;
*ad: identify each ad&lt;br /&gt;
&lt;br /&gt;
The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Content Metadata ====&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !!	Values	 !! Required&lt;br /&gt;
|-&lt;br /&gt;
| clientid	|| &lt;br /&gt;
parent ID – value is automatically populated through provided App ID.&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to override the brand configured to the App ID, pass parent &amp;lt;br/&amp;gt;&lt;br /&gt;
value here and the sub-brand ID associated to that brand in the subbrand &amp;lt;br/&amp;gt;&lt;br /&gt;
key (e.g. multiple brands in App)	&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| vcid	|| sub-brand ID – value is automatically populated through provided&amp;lt;br/&amp;gt;&lt;br /&gt;
App ID. In order to override the sub-brand configured to the App ID, value can &amp;lt;br/&amp;gt;&lt;br /&gt;
be passed here (e.g. multiple sub-brands in App)&lt;br /&gt;
||&lt;br /&gt;
Nielsen provided	&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| type ||	type of asset	|| &amp;quot;content&amp;quot;	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid	|| unique ID assigned to asset	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| program	|| name of program (25 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| title	|| episode title (40 character limit)	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| length	|| length of content in seconds	|| seconds 86400 for live stream)||	✓&lt;br /&gt;
|-&lt;br /&gt;
| mediaURL	|| URL location of the content being streamed	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| segB	|| custom segment B	|| custom	||&lt;br /&gt;
|-&lt;br /&gt;
| segC	|| custom segment C	|| custom	 ||&lt;br /&gt;
|-&lt;br /&gt;
| airdate	|| the airdate in the linear TV ||	YYYYMMDD HH:MI:SS	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode	|| full episode flag ||	&lt;br /&gt;
*&amp;quot;y&amp;quot;– full episode&lt;br /&gt;
*&amp;quot;n&amp;quot;– non full episode	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId1	|| standard episode ID	|| custom	|| ✓&lt;br /&gt;
|-&lt;br /&gt;
| crossId2	|| content originator (only required for distributors)	|| Nielsen provided	||&lt;br /&gt;
|-&lt;br /&gt;
|adloadtype	|| type of ad load:&lt;br /&gt;
* 1) - Linear – matches TV ad load &lt;br /&gt;
* 2) Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
||&lt;br /&gt;
*&amp;quot;1&amp;quot; – content with linear ads &lt;br /&gt;
*&amp;quot;2&amp;quot; – content with dynamic ads	&lt;br /&gt;
||&lt;br /&gt;
✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Content Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var contentMetadataObject =&lt;br /&gt;
{  &lt;br /&gt;
  type:           'content',&lt;br /&gt;
  assetid:        'VID123-123456',&lt;br /&gt;
  program:        'program name',&lt;br /&gt;
  title:          'episode title',&lt;br /&gt;
  length:         'length in seconds',&lt;br /&gt;
  mediaURL:       'http://www.site.com/videoAsset',&lt;br /&gt;
  segB:           'custom segment B',&lt;br /&gt;
  segC:           'custom segment C',&lt;br /&gt;
  airdate:        'YYYYMMDD HH:MI:SS',&lt;br /&gt;
  isfullepisode:  'y',&lt;br /&gt;
  crossId1:       'Standard Episode ID',&lt;br /&gt;
  crossId2:       'Content Originator',&lt;br /&gt;
  adloadtype:     '2'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ad Metadata Object ===&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys	!! Description	!! Values	!! Required&lt;br /&gt;
|-&lt;br /&gt;
| type	|| type of ad	|| 'preroll', 'midroll', or 'postroll' ||	✓&lt;br /&gt;
|-&lt;br /&gt;
| assetid ||	unique ID assigned to ad	|| custom	|| ✓&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Ad Object ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var adMetadataObject = &lt;br /&gt;
{  &lt;br /&gt;
  assetid: 'AD-1',&lt;br /&gt;
  type:    'preroll'&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt; 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. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Call Nielsen APIs ====&lt;br /&gt;
The method for calling events is ggPM().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Other Interrupt Scenarios ===&lt;br /&gt;
The following possible browser interruption scenarios must be handled:&lt;br /&gt;
&lt;br /&gt;
* Browser/Tab close&lt;br /&gt;
* Leaving the page to another destination&lt;br /&gt;
* Pressing the stop button&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
window.addEventListener('beforeunload', function(event) &lt;br /&gt;
{&lt;br /&gt;
  // Only inside a midroll indicate &amp;lt;stop&amp;gt; for the ad&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
  &lt;br /&gt;
  // Indicate &amp;lt;end&amp;gt; and &amp;lt;stop&amp;gt; for the content&lt;br /&gt;
  nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
  nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' User may need to add code to support specific browser versions (e.g. older versions of Internet Explorer).&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Events ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !!	Parameter	!! Description&lt;br /&gt;
|-&lt;br /&gt;
| 'loadMetadata'	|| content/ad metadata object	|| Needs to be called at the beginning of each asset&lt;br /&gt;
|-&lt;br /&gt;
| 'setPlayheadPosition'	|| playhead position as integer&amp;lt;br/&amp;gt;&lt;br /&gt;
VOD: || current position in seconds &amp;lt;br/&amp;gt;&lt;br /&gt;
Live: current UTC timestamp &amp;lt;br/&amp;gt;&lt;br /&gt;
Note: 'setPlayheadPosition' has to be called every second&lt;br /&gt;
||&lt;br /&gt;
Pass playhead position every second during playback&lt;br /&gt;
|-&lt;br /&gt;
| 'stop' ||	playhead position	|| Call when content or ads complete playing and pass playhead position&lt;br /&gt;
|-&lt;br /&gt;
| 'end'	|| playhead position in seconds	|| Call when the current video asset completes playback and pass the playhead position. &amp;lt;br/&amp;gt;&lt;br /&gt;
Example: At the end of the content stream, if the user switches to another piece of content, when the browser is refreshed or closed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SDK Playhead Event Sequence ==&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// START OF STREAM&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject); &lt;br /&gt;
 &lt;br /&gt;
// PREROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', prerollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', midrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// CONTENT&lt;br /&gt;
nSdkInstance.ggPM('loadMetadata', contentMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('end', playheadPosition);&lt;br /&gt;
 &lt;br /&gt;
// POSTROLL&lt;br /&gt;
nSdkInstance.ggPM('loadmetadata', postrollMetadataObject);&lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
//  &lt;br /&gt;
//   pass playhead every second&lt;br /&gt;
//   &lt;br /&gt;
nSdkInstance.ggPM('setPlayheadPosition', playheadPosition);&lt;br /&gt;
nSdkInstance.ggPM('stop', playheadPosition);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
* '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'.&lt;br /&gt;
&lt;br /&gt;
* For Ad Pods, events must be called for each individual Ad. Each Ad playhead position should begin at ‘0’ when ad starts.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nielsen Opt-Out ==&lt;br /&gt;
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.&lt;br /&gt;
*A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings).&lt;br /&gt;
*A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
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 http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Opt Back In ===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Going Live ===&lt;br /&gt;
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.&lt;br /&gt;
Disable debug logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call.&lt;br /&gt;
Example Production Initialization Call&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1649</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1649"/>
		<updated>2017-09-28T22:54:32Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: '&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG'&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Should Be Called:&lt;br /&gt;
* Before each transition from ad to content, content to ad, or ad to ad&lt;br /&gt;
* Upon pause&lt;br /&gt;
* When playback is interrupted (connection lost, user exits video or page)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; || Called once content has completed fully || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1648</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1648"/>
		<updated>2017-09-28T22:51:19Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: sdpfojidsf\&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Should Be Called:&lt;br /&gt;
* Before each transition from ad to content, content to ad, or ad to ad&lt;br /&gt;
* Upon pause&lt;br /&gt;
* When playback is interrupted (connection lost, user exits video or page)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; || Called once content has completed fully || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1647</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1647"/>
		<updated>2017-09-28T22:50:57Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: yes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Should Be Called:&lt;br /&gt;
* Before each transition from ad to content, content to ad, or ad to ad&lt;br /&gt;
* Upon pause&lt;br /&gt;
* When playback is interrupted (connection lost, user exits video or page)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; || Called once content has completed fully || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1646</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1646"/>
		<updated>2017-09-28T22:50:17Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: stop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Should Be Called:&lt;br /&gt;
* Before each transition from ad to content, content to ad, or ad to ad&lt;br /&gt;
* Upon pause&lt;br /&gt;
* When playback is interrupted (connection lost, user exits video or page)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; || Called once content has completed fully || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1645</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1645"/>
		<updated>2017-09-28T22:48:30Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: end&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;end&amp;lt;/code&amp;gt; || Called once content has completed fully || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1644</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1644"/>
		<updated>2017-09-28T22:47:06Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: stop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second, and starts at 0 || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1643</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1643"/>
		<updated>2017-09-28T22:46:05Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: got rid of stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Starts at 0 at the beginning of each ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1642</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1642"/>
		<updated>2017-09-28T22:45:24Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: deleted things&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Starts at 0 at the beginning of each ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1641</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1641"/>
		<updated>2017-09-28T22:43:44Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: dfgiojdfgjoi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== play() ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;play()&amp;lt;/code&amp;gt; call is required only once per viewing session (until app is killed)&lt;br /&gt;
* Called just before playback commences for first piece of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Play || &amp;lt;code&amp;gt;channelname&amp;lt;/code&amp;gt; || Name of Channel || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Starts at 0 at the beginning of each ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of each asset before transition ie. content to ad, ad to content, ad to ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1640</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1640"/>
		<updated>2017-09-28T22:40:14Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: stop&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== play() ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;play()&amp;lt;/code&amp;gt; call is required only once per viewing session (until app is killed)&lt;br /&gt;
* Called just before playback commences for first piece of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Play || &amp;lt;code&amp;gt;channelname&amp;lt;/code&amp;gt; || Name of Channel || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Content || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1639</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1639"/>
		<updated>2017-09-28T22:39:59Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== play() ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;play()&amp;lt;/code&amp;gt; call is required only once per viewing session (until app is killed)&lt;br /&gt;
* Called just before playback commences for first piece of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Play || &amp;lt;code&amp;gt;channelname&amp;lt;/code&amp;gt; || Name of Channel || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Content || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad (no parameters or metadata)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1638</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1638"/>
		<updated>2017-09-28T22:39:00Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: deleted things&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== play() ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;play()&amp;lt;/code&amp;gt; call is required only once per viewing session (until app is killed)&lt;br /&gt;
* Called just before playback commences for first piece of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Play || &amp;lt;code&amp;gt;channelname&amp;lt;/code&amp;gt; || Name of Channel || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Content || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad (no parameters or metadata)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content (no parameters or metadata)&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1637</id>
		<title>Digital Pre-Certification Checklist Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Digital_Pre-Certification_Checklist_Browser_SDK&amp;diff=1637"/>
		<updated>2017-09-28T22:38:30Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: updated things&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-Certification Checklist - VOD with Ads ==&lt;br /&gt;
Before starting the certification process, please verify the following steps have been completed.&lt;br /&gt;
* Your Client Service representative should have already discussed a reporting hierarchy with you -- along with a Parent, Brand, and Sub-brand/Channel&lt;br /&gt;
* Your Technical Account Manager should have:&lt;br /&gt;
** provided you with an APID&lt;br /&gt;
** informed you of our Opt-Out requirement to be included in your Privacy Policy section of your site&lt;br /&gt;
** informed you to add the Static Queue Snippit on each page you wish to enable video measurement &lt;br /&gt;
** informed you that the apid, 'instanceName', and ‘nol_sdkDebug’ : ‘DEBUG’ should be present in the SDK initialization&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
The first step in the Certification process is to ensure that the Nielsen SDK is initializing on page load, and that the global metadata values are present.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || &amp;lt;code&amp;gt;PXXXXX-XXXXXX-XXXXX-XXXXX&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| instanceName || &amp;lt;code&amp;gt;'nlsnInstance'&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || &amp;lt;code&amp;gt;debug&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Browser SDK Queue Snippit &amp;amp; Initialization Example'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSDictionary* appInformation = @&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
  // Add Static Queue Snippet&lt;br /&gt;
 !function(t,n)&lt;br /&gt;
 {&lt;br /&gt;
   t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i)&lt;br /&gt;
   {&lt;br /&gt;
    return s=t.document,&lt;br /&gt;
    r=s.createElement(&amp;quot;script&amp;quot;),&lt;br /&gt;
    r.async=1,&lt;br /&gt;
    r.src=(&amp;quot;http:&amp;quot;===t.location.protocol?&amp;quot;http:&amp;quot;:&amp;quot;https:&amp;quot;)+&amp;quot;//cdn-gl.imrworldwide.com/conf/&amp;quot;+e+&amp;quot;.js#name=&amp;quot;+o+&amp;quot;&amp;amp;ns=&amp;quot;+n,&lt;br /&gt;
    i=s.getElementsByTagName(&amp;quot;script&amp;quot;)[0],&lt;br /&gt;
    i.parentNode.insertBefore(r,i),&lt;br /&gt;
    t[o]=t[o]||{g:c,ggPM:function(n,e,c,r,s){(t[o].q=t[o].q||[]).push([n,e,c,r,s])}},&lt;br /&gt;
    t[o]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
} &lt;br /&gt;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // Created SDK Instance&lt;br /&gt;
  var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;XXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX&amp;quot;,&amp;quot;nlsnInstance&amp;quot;, {nol_sdkDebug: &amp;quot;debug&amp;quot;});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Cases ==&lt;br /&gt;
The following lists the test cases along with the Expected results:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| SDK Initialized || &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; || Correct APID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;instanceName&amp;lt;/code&amp;gt; || SDK Instance Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;'DEBUG&amp;lt;/code&amp;gt; || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== play() ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;play()&amp;lt;/code&amp;gt; call is required only once per viewing session (until app is killed)&lt;br /&gt;
* Called just before playback commences for first piece of content&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Param !! Expected Result !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Play || &amp;lt;code&amp;gt;channelname&amp;lt;/code&amp;gt; || Name of Channel || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Called at beginning of content, or when resuming content from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - ad ===&lt;br /&gt;
* Called at beginning of ad, or when resuming ad from interruption&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ad_2201343201&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Preroll ad ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of ad&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata() - Content ===&lt;br /&gt;
* Test is to validate Content metadata is the same as original metadata passed during initial loadMetadata call.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test !! Param !! Example Value !! Accepted Values !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| loadMetadata || &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;assetid&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;unique_id_500291&amp;quot;&amp;lt;/code&amp;gt; || (unique per asset) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;600&amp;quot;&amp;lt;/code&amp;gt; || length in seconds (int or float) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Episode Title&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;program&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Show Name&amp;quot;&amp;lt;/code&amp;gt; || (any non-empty value) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segB&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Primetime&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;segC&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;Comedy&amp;quot;&amp;lt;/code&amp;gt; || (any value), used for optional breakdown || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId1&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;EP018S9S290015&amp;quot;&amp;lt;/code&amp;gt; || Gracenote ID || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;crossId2&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;ABC&amp;quot;&amp;lt;/code&amp;gt; || Network Name || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;isfullepisode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; || (&amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;) (&amp;lt;code&amp;gt;&amp;quot;Y&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;N&amp;quot;&amp;lt;/code&amp;gt;) || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;airdate&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;20160206 23:00:00&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;YYYYMMDD[space]HH:MM:SS&amp;quot;&amp;lt;/code&amp;gt; -- note: HH=24 hour time || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;adloadtype&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for linear ads, &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; for DAI || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;hasAds&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; for no ads, &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; for has ads || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== setPlayheadPosition() - Content ===&lt;br /&gt;
* Track current position of playhead&lt;br /&gt;
* Starts at 0 at the beginning of content&lt;br /&gt;
* Updated at least once per second&lt;br /&gt;
* Separate playhead position for ads and content, should accurately reflect current position in either ads or content&lt;br /&gt;
* Final playhead position for content must equal the length specified in loadMetadata(), followed by end() call&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;setPlayehadPosition&amp;lt;/code&amp;gt; || Called every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || Called at the end of Content || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== stop() ===&lt;br /&gt;
* Indicates one of the following:&lt;br /&gt;
* Playback of content or ad was interrupted&lt;br /&gt;
* Reached end of ad (no parameters or metadata)&lt;br /&gt;
&lt;br /&gt;
=== end() ===&lt;br /&gt;
* Reached the end of content (no parameters or metadata)&lt;br /&gt;
&lt;br /&gt;
== Interruptions ==&lt;br /&gt;
* All interruptions to playback of content or ads should trigger a call to stop(). Once the interruption is over, loadMetadata() with the same metadata should be called, followed by playheadPosition resuming from where it left off.&lt;br /&gt;
&lt;br /&gt;
* Interruptions include:&lt;br /&gt;
** user-induced pause&lt;br /&gt;
** screen turned off&lt;br /&gt;
** refresh page&lt;br /&gt;
** internet connection lost (n.b. cached playback plays as normal until it expires)&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| user-induced pause || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| screen turned off || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| app sent to background || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| headphones removed || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| alarm/call interruption || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| internet connection lost || &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || &lt;br /&gt;
|-&lt;br /&gt;
| content paused || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; is not passed || &lt;br /&gt;
|-&lt;br /&gt;
| resume content || &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; is called for content || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;loadMetadataM&amp;lt;/code&amp;gt; is the same as original || &lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; continues from resumed position || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Expected SDK behavior for all interruptions:'''&lt;br /&gt;
# interruption triggers stop() call&lt;br /&gt;
# when content resumes, loadMetadata() is called with the same metadata that was playing previously (ad or content)&lt;br /&gt;
# playheadPosition() resumes from the same position before the interruption&lt;br /&gt;
&lt;br /&gt;
'''Example session:'''&lt;br /&gt;
* 5 minutes of content played, call interruption, content resumes until end of 15 min video&lt;br /&gt;
&lt;br /&gt;
== Scrubbing ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| Scrub Backward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub Forward || new playhead position is accurate || &lt;br /&gt;
|-&lt;br /&gt;
|  || new playhead continues from new position || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub to end || final playhead position is passed || &lt;br /&gt;
|-&lt;br /&gt;
|  || end event called at completion of content playback || &lt;br /&gt;
|-&lt;br /&gt;
| Scrub past midroll || Playhead for content stops || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Midroll &amp;amp; Postroll Ads ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt; || Called for each Ad || &lt;br /&gt;
|-&lt;br /&gt;
|  || Required Metadata is accurate || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt; || Passed every second || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || called for each ad || &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;loadMetadata()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;playheadPosition&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;stop()&amp;lt;/code&amp;gt; || correct sequence for each ad || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
The site must provide a means for the user to opt-out of or opt back into Nielsen measurement. Include the following two items in the site’s Privacy Policy:&lt;br /&gt;
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)&lt;br /&gt;
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy&lt;br /&gt;
&lt;br /&gt;
The following paragraph is a template for an opt-out statement&lt;br /&gt;
Our properties may feature Nielsen proprietary measurement software, which will allow you 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, refer to Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Users must have access to &amp;quot;About Nielsen Measurement&amp;quot; page. User can click this page from app settings screen.&lt;br /&gt;
* URL to this web page should be called from SDK by invoking optOutURL and opened in 'WebView' / External browser.&lt;br /&gt;
* If the App SDK returns NULL as Opt-Out URL, handle the exception gracefully and retry later.&lt;br /&gt;
* To retrieve the current Opt-Out status of a device, use the optOutStatus method.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Test Case !! Test Condition !! Pass/Fail&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;optOutView&amp;lt;/code&amp;gt; || User can Opt-Out || &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=Sandbox&amp;diff=1636</id>
		<title>Sandbox</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=Sandbox&amp;diff=1636"/>
		<updated>2017-09-28T19:48:23Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: pulling over iOS SDK template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
To start using the App SDK, the following details are required:&lt;br /&gt;
* '''App ID (appid):''' Unique ID assigned to the player/site and configured by product.&lt;br /&gt;
* '''sfcode:''' Unique identifier for the environment that the SDK should point to.&lt;br /&gt;
* '''Nielsen SDK''' and '''Sample Player''': A part of the downloaded package&lt;br /&gt;
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.&lt;br /&gt;
Refer to [[Digital Measurement Onboarding]] guide for information on how to get a Nielsen App SDK and appid.&lt;br /&gt;
&lt;br /&gt;
== Import Library ==&lt;br /&gt;
Refer to [[iOS SDK API Reference#Importing Frameworks|iOS SDK API Reference - Importing Frameworks]] for information on importing libraries.&lt;br /&gt;
* The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.&lt;br /&gt;
&lt;br /&gt;
== Initialize SDK ==&lt;br /&gt;
Initialize App SDK as soon as the application is launched. Refer to [[iOS SDK API Reference#Initialization|iOS SDK API Reference - Initialization]] for details on initializing an AppSDK object and the parameters required.&lt;br /&gt;
&lt;br /&gt;
== Configure API calls ==&lt;br /&gt;
=== play ===&lt;br /&gt;
Use [[play]] to pass the channel descriptor information through channelName parameter when the user taps the '''Play''' button on the player.&lt;br /&gt;
&lt;br /&gt;
=== loadMetadata ===&lt;br /&gt;
Use [[loadMetadata]] to pass 'content' and 'ad' [[Digital Measurement Metadata]]. The CMS data must be passed as a JSON object.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) loadMetadata :(id)metadata;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Refer to [[loadMetadata]] for the list of parameters to be passed in the JSON object.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The [[loadMetadata]] call after the first [[play]] call must have ‘content’ details (&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;). This call should occur before any preroll ad starts playing.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== playheadPosition (Cotent) ===&lt;br /&gt;
Use [[playheadPosition]] to pass the position of the playhead while the content is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) playheadPosition: (long long) playheadPos&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! # !! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Live** || UTC of the live content || Client-defined || Yes || Seconds since 1970&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Video On Demand (VOD)** || Position taken from beginning of the content in seconds. || Client-defined || Yes || Current player position from beginning of the content.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt;''Only one of these parameters is mandatory''&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' If playhead is not available from audio / video measurement, allow the app to start a timer (1-5 seconds) and send playhead position to SDK based on the timer event. Once the actual playhead is available, let the app send the proper playhead position. This allows the SDK to calculate and provide a closer value for duration.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Buffering state'''&lt;br /&gt;
* Do not supply playhead position while the content is being buffered.&lt;br /&gt;
* If the content is in buffering state continuously for more than 30 seconds, call [[stop]] API.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Live Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    long long pos = [[NSDate date] timeIntervalSince1970];&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''On-demand Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    CMTime curTime=[player currentTime];&lt;br /&gt;
    long pos=CMTimeGetSeconds(curTime);&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== playheadPosition (Ad) ===&lt;br /&gt;
Use [[playheadPosition]] to pass the position of the playhead while the advertisement is being played.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    – (void) playheadPosition: (long long) playheadPos&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Key !! Description !! Values !! Required? (Y/N) !! Example&lt;br /&gt;
|-&lt;br /&gt;
| Ad || Position taken from beginning of the ad in seconds || Client-defined || Yes || Seconds since tart of the ad&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Ad Content'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;    CMTime curTime=[adplayer currentTime];&lt;br /&gt;
    long pos=CMTimeGetSeconds(curTime);&lt;br /&gt;
    [nAppApiObject playheadPosition:pos];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The playhead positions for ad and content should be maintained separately.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== stop ===&lt;br /&gt;
Call [[stop]] only at the end of ad or in case of interruptions during playback like flight mode, Wi-Fi toggle, etc. Call [[loadMetadata]] and [[playheadPosition]] when the stream resumes. Call [[play]] when starting the new stream.&lt;br /&gt;
&lt;br /&gt;
=== end ===&lt;br /&gt;
Call [[end]] only at the end of playback.&lt;br /&gt;
&lt;br /&gt;
=== API Call sequence ===&lt;br /&gt;
==== Use Case 1: Content has no Advertisements ====&lt;br /&gt;
Use the sample API sequence below as a reference to identify the specific events that need to be called during content playback without ads.&lt;br /&gt;
&lt;br /&gt;
Call [[play]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata]] with JSON metadata for content as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;vid345-67483&amp;quot;,&lt;br /&gt;
  &amp;quot;program&amp;quot;: &amp;quot;ProgramName&amp;quot;,&lt;br /&gt;
  &amp;quot;title&amp;quot;: &amp;quot;Program S3, EP1&amp;quot;,&lt;br /&gt;
  &amp;quot;length&amp;quot;: &amp;quot;3600&amp;quot;,&lt;br /&gt;
  &amp;quot;segB&amp;quot;: &amp;quot;CustomSegmentValueB&amp;quot;,&lt;br /&gt;
  &amp;quot;segC&amp;quot;: &amp;quot;CustomSegmentValueC&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId1&amp;quot;: &amp;quot;Reference11&amp;quot;,&lt;br /&gt;
  &amp;quot;crossId2&amp;quot;: &amp;quot;Reference22&amp;quot;,&lt;br /&gt;
  &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
  &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
  &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[playheadPosition]] every one second until a pause / stop.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;[nielsenMeter play: channelName];&amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| Content || &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // playheadPosition is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| End of Stream || &amp;lt;code&amp;gt;[nielsenMeter end];&amp;lt;/code&amp;gt; || // Content playback is completed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Use Case 2: Content has Advertisements ====&lt;br /&gt;
Call [[play]] with channelName JSON as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;channelName&amp;quot;: &amp;quot;TheMovieTitle&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Call [[loadMetadata]] with JSON metadata for ad as below.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;{&lt;br /&gt;
   &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
   &amp;quot;assetId_ad&amp;quot;: &amp;quot;ad=123&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: In case the individual ad details are not available, send ad pod (presence) details through the [[loadMetadata]] and playhead position through [[playheadPosition]].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call [[playheadPosition]] every one second until a pause / stop / another ''loadMetadata'' is called. Playhead should be passed for the entire duration of ad pod, if the ad pod details are passed as part of [[loadMetadata]].&lt;br /&gt;
&lt;br /&gt;
The sample API sequence can be used as a reference to identify the specific events that need to be called during content and ad playback.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type !! Sample code !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Start of stream || &amp;lt;code&amp;gt;[nielsenMeter play: channelName];&amp;lt;/code&amp;gt; || // channelName contains JSON metadata of channel/video name being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Preroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: prerollMetadataObject];&amp;lt;/code&amp;gt; || // prerollMetadataObject contains the JSON metadata for the preroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the preroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after preroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after the content is paused (ad starts)&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Midroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: midrollMetadataObject];&amp;lt;/code&amp;gt; || // midrollMetadataObject contains the JSON metadata for the midroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the midroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after midroll occurs&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Content (End of stream) || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: contentMetadataObject];&amp;lt;/code&amp;gt; || // contentMetadataObject contains the JSON metadata for the content being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the content is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter end];&amp;lt;/code&amp;gt; || // Called at the end of content&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Postroll || &amp;lt;code&amp;gt;[nielsenMeter loadMetadata: postrollMetadataObject];&amp;lt;/code&amp;gt; || // postrollMetadataObject contains the JSON metadata for the postroll ad&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter playheadPosition: position];&amp;lt;/code&amp;gt; || // position is position of the playhead while the postroll ad is being played&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;[nielsenMeter stop];&amp;lt;/code&amp;gt; || // Call stop after postroll occurs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' Each Ad playhead should reset or begin from 0 at ad start. When content has resumed following an ad break, playhead position must continue from where previous content segment was left off.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interruptions during playback ==&lt;br /&gt;
As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios:&lt;br /&gt;
* Pause / Play&lt;br /&gt;
* Network Loss (Wi-Fi / Airplane / Cellular)&lt;br /&gt;
* Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
* Alarm Interrupt&lt;br /&gt;
* Content Buffering&lt;br /&gt;
* Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
* App going in the Background/Foreground (Video players only, not for Audio players)&lt;br /&gt;
* Channel / Station Change Scenario&lt;br /&gt;
* Unplugging of headphone&lt;br /&gt;
In case of encountering one of the above interruptions, the player application needs to&lt;br /&gt;
* Call [[stop]] immediately (except when content is buffering) and withhold sending playhead position.&lt;br /&gt;
* Start sending pings – [[loadMetadata]] and [[playheadPosition]] for the new viewing session, once the playback resumes.&lt;br /&gt;
Please see the [[Digital Measurement FAQ]] for more details&lt;br /&gt;
&lt;br /&gt;
== Nielsen Measurement Opt-Out Implementation ==&lt;br /&gt;
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
* When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from [[optOutURL]]) should be displayed.&lt;br /&gt;
* Use [[optOutStatus]] to retrieve the device’s Opt-Out status.&lt;br /&gt;
* This Opt-out page should be displayed in a webview (within the app) and not in any external browser.&lt;br /&gt;
* Capture the user’s selection in this page and pass it to the SDK through [[userOptOut]] for Nielsen to save the user’s preference.&lt;br /&gt;
&amp;lt;!-- * For more details, refer to [[iOS SDK API Reference#iOS Opt-Out Implementation|iOS SDK API Reference - iOS Opt-Out Implementation]] and Nielsen Digital Privacy. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-Certification Checklists ==&lt;br /&gt;
After the application is ready to be sent for Nielsen Certification, please go through the Pre-Certification Checklist and ensure the app behaves as expected, before submitting to Nielsen.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - App ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Roku_Cloud_API&amp;diff=1531</id>
		<title>DCR Video &amp; Static Roku Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Roku_Cloud_API&amp;diff=1531"/>
		<updated>2017-09-22T01:23:18Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: Opt OUt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your Roku Apps.&lt;br /&gt;
*For other OTT Apps, please see [[DCR Video &amp;amp; Static Cloud API]]&lt;br /&gt;
*For Mobile Apps, please see [[DCR Video &amp;amp; Static Mobile Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. We will review the update to the production endpoint during the Go Live section of this guide.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be passed with every request and must remain consistent throughout each individual session.&lt;br /&gt;
&lt;br /&gt;
===Example Roku Sample Code Provided Below:===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionTime = createObject(&amp;quot;roDateTime&amp;quot;)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = (sessionTime.asSeconds()).tostr()+(sessionTime.getMilliseconds()).tostr()&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CBC00.iv3x2EV0BpHH9AbZK%2FnBWWRhZbj7pD%3D...&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| encdata || Nielsen - Roku ID for Advertisers || N-RIDA Payload || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| Example || Example || Example || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Encdata (N-RIDA): Nielsen - Roku Identifier for Advertisers =====&lt;br /&gt;
The N-RIDA (Nielsen-Roku ID for Advertisers) is a proprietary advertising identifier that ties back to an individual Roku device, and allows Nielsen to attribute audience metrics. The N-RIDA is provided by Roku, and is pulled through the Roku &amp;lt;code&amp;gt;AdIface.GetNielsenContentData()&amp;lt;/code&amp;gt; API.&lt;br /&gt;
&lt;br /&gt;
The N-RIDA payload should be requested once per user session and populated in the &amp;lt;code&amp;gt;&amp;quot;encdata&amp;quot;&amp;lt;/code&amp;gt; Nielsen key within the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; payload. Each Cloud API request throughout a user session should include the same N-RIDA payload. The N-RIDA should be established when a user launches the app, and it should be maintained until the user exits. A new N-RIDA payload should be requested when the user re-enters the app.&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites For Using The AdIface.GetNielsenContentData() Roku API'''&lt;br /&gt;
&lt;br /&gt;
* Roku Ad Framework (RAF) must be implemented:&lt;br /&gt;
** &amp;lt;code&amp;gt;bs_libs_required=roku_ads_lib&amp;lt;/code&amp;gt; must be included in the Roku manifest file.&lt;br /&gt;
** &amp;lt;code&amp;gt;Library &amp;quot;Roku_Ads.brs&amp;quot;&amp;lt;/code&amp;gt; should be the first entry in your Roku main.brs file.&lt;br /&gt;
** &amp;lt;code&amp;gt;adIface = Roku_Ads()&amp;lt;/code&amp;gt; allows you to access the Roku Ad Framework interface and must be called before utilizing RAF API's such as &amp;lt;code&amp;gt;AdIface.GetNielsenContentData()&amp;lt;/code&amp;gt;&lt;br /&gt;
* For additional details for integrating the Roku Ad Framework (RAF) please refer to the link provided below:&lt;br /&gt;
** https://sdkdocs.roku.com/display/sdkdoc/Integrating+the+Roku+Advertising+Framework&lt;br /&gt;
&lt;br /&gt;
===== Request N-RIDA for the devInfo Payload &amp;lt;code&amp;gt;encdata&amp;lt;/code&amp;gt; parameter using AdIface.GetNielsenContentData() =====&lt;br /&gt;
&lt;br /&gt;
'''Example Code For Configuring Encdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;// create a variable as a placeholder for the N-RIDA payload&lt;br /&gt;
n_Rida=AdIface.GetNielsenContentData()&lt;br /&gt;
&lt;br /&gt;
// populate the encdata key in devInfo with the AdIface.GetNielsenContentData() retrun&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;encdata&amp;quot;: &amp;quot;n_Rida&amp;quot;, //insert the AdIface.GetNielsenContentData() return within encdata&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': When pulled and populated into the encdata key, the &amp;lt;code&amp;gt;AdIface.GetNielsenContentData()&amp;lt;/code&amp;gt; return will be formatted similarly to the example below, and will include &amp;quot;encdata=&amp;quot; within the return along with the N-RIDA key.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&amp;quot;encdata&amp;quot;:&amp;quot;encdata=v1.key.RokuAES256CBC00.iv.HSh88AM%2BG%2Fx57TZ%2BW5j5Fw%3D%3D...&amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || program genre abbreviation - see [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || The complete event must be sent when the content has completed full playback. Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event must be sent when the session is completed, or terminated. After 30 minutes of inactivity, the session will expire. All creditable duration will be summarized for all asset types when delete occurs (content and ads).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===Example Image Request===&lt;br /&gt;
&lt;br /&gt;
In order to execute Cloud API calls, image requests will need to be established for each event.&lt;br /&gt;
&lt;br /&gt;
===Playhead Image Request Example Code===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
playheadRequest = CreateObject(&amp;quot;roUrlTransfer&amp;quot;)&lt;br /&gt;
                sendUrl = sessionUrl+playheadRequest.Escape(playheadPayload)&lt;br /&gt;
                playheadRequest.SetUrl(sendUrl)&lt;br /&gt;
                xport=CreateObject(&amp;quot;RoMessagePort&amp;quot;)&lt;br /&gt;
                playheadRequest.setport(xport)&lt;br /&gt;
                aa3 = {}&lt;br /&gt;
                aa3[&amp;quot;Connection&amp;quot;] = &amp;quot;keep-alive&amp;quot;&lt;br /&gt;
                aa3[&amp;quot;Content-type&amp;quot;] = &amp;quot;image/gif&amp;quot;&lt;br /&gt;
                playheadRequest.SetHeaders(aa3)&lt;br /&gt;
                playheadRequest.setRequest(&amp;quot;GET&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
&lt;br /&gt;
When playback is interrupted, the app needs to send delete immediately.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionTime = createObject(&amp;quot;roDateTime&amp;quot;)&lt;br /&gt;
sessionID = (sessionTime.asSeconds()).tostr()+(sessionTime.getMilliseconds()).tostr()&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
sendUrl = sessionUrl.Escape(payload)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
print &amp;quot;Playhead Event &amp;quot; + sendUrl&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
print &amp;quot;Event Payload &amp;quot;+ playheadPayload + modSeq%.tostr()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
httpCode = GetResponseCode()&lt;br /&gt;
print &amp;quot;Response Code  &amp;quot; +httpCode.tostr()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. The Opt-Out requirement can be fulfilled by creating an Opt-Out/Opt-In button, toggle switch, or slider within the app &amp;quot;Settings&amp;quot;, or &amp;quot;About&amp;quot; section to allow the user selection. If you have the ability to render text within the Opt-Out screen, it is recommended to add the Privacy Information included below.&lt;br /&gt;
&lt;br /&gt;
[[File:Nielsen Opt-Out.png|link=]]&lt;br /&gt;
&lt;br /&gt;
You will need to store the User Opt-Out (uoo) status, so that it can be retrieved and populated in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; metadata which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete).&lt;br /&gt;
&lt;br /&gt;
*In addition, you will need to ensure that the encdata field is populated with a blank value if a user has elected to Opt-Out.&lt;br /&gt;
&lt;br /&gt;
*If the device offers &amp;quot;Limit Ad Tracking&amp;quot; or &amp;quot;Opt-Out&amp;quot; device settings, you must set uoo=true, and also ensure that the encdata is set to a blank value if the user elects to enable this setting.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement (Recommended Default Setting) || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;encdata&amp;quot;: &amp;quot;encdata=v1.key.RokuAES256CB...&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;encdata&amp;quot;: &amp;quot;&amp;quot;, //Encdata must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Privacy Information Template To Include In Opt-Out Screen =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please make the appropriate selection within the app. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''''Disclosure Template'''''&lt;br /&gt;
&lt;br /&gt;
Additionally, you must update the App description information from the App Distribution Store with the Nielsen Measurement disclosure below:&lt;br /&gt;
&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent.&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded.&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections by validating the Cloud API events called after the user Opt-Out/Opt-In selection.&lt;br /&gt;
*Test that the encdata field is populated with a blank value if a user has elected to Opt-Out. For Example: &amp;quot;encdata&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
*If the device supports &amp;quot;Limit Ad Tracking&amp;quot; or has device &amp;quot;Opt-Out&amp;quot; settings, test that uoo=true, and that encdata is set to a blank value if enabled in the device settings.&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging.&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
	<entry>
		<id>https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Mobile_Cloud_API&amp;diff=1530</id>
		<title>DCR Video &amp; Static Mobile Cloud API</title>
		<link rel="alternate" type="text/html" href="https://engineeringportal.nielsen.com/w/index.php?title=DCR_Video_%26_Static_Mobile_Cloud_API&amp;diff=1530"/>
		<updated>2017-09-22T01:22:13Z</updated>

		<summary type="html">&lt;p&gt;RyanCarlson: enabled&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR &amp;amp; DTVR}}  {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
This guide shows you how to integrate the Nielsen Cloud API to enable Digital Content Ratings (DCR) measurement on your mobile  apps.&lt;br /&gt;
*For Roku Apps, please see [[DCR Video &amp;amp; Static Roku Cloud API]]&lt;br /&gt;
*For Mobile Apps, please see [[DCR Video &amp;amp; Static Mobile Cloud API]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
To get started, you will need a Nielsen App ID. The App ID is a unique ID assigned to your app. This will be provided to you upon starting the integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Integration==&lt;br /&gt;
We will cover the steps for constructing the Cloud API Calls.&lt;br /&gt;
&lt;br /&gt;
===Request Overview===&lt;br /&gt;
&lt;br /&gt;
====URL Structure====&lt;br /&gt;
&lt;br /&gt;
The Cloud API Calls are HTTP GET Requests with the URL structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;[endpoint]/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The URL includes the following components:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;code&amp;gt;[endpoint]&amp;lt;/code&amp;gt;: location of data collection environment&lt;br /&gt;
*&amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt;: provided App ID&lt;br /&gt;
*&amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;: unique value for each user session&lt;br /&gt;
*&amp;lt;code&amp;gt;[payload]&amp;lt;/code&amp;gt;: metadata and events&lt;br /&gt;
&lt;br /&gt;
====Endpoint====&lt;br /&gt;
&lt;br /&gt;
There are endpoints for testing and production:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During testing, all calls should be pointed to the testing endpoint. We will review the update to the production endpoint during the Go Live section of this guide.&lt;br /&gt;
&lt;br /&gt;
====URL Example====&lt;br /&gt;
As you move through the integration steps, you can reference the below URL structure with the expanded payload:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static_metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content_metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event],&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playhead_position],&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type],&lt;br /&gt;
  &amp;quot;utc&amp;quot;: [UTC]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Session ID===&lt;br /&gt;
A unique Session ID must be created upon app launch and provided in the URL. This will allow measurement to occur for the entire duration that a user is within the app.&lt;br /&gt;
&lt;br /&gt;
The session ID must be a GUID that is passed with every request and remain consistent throughout each individual session. You can use an existing ID, a random number, or date.now() as shown in the recommended sample code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upon exiting the app, the session will need to be terminated using the delete event. Sessions will automatically expire after 30 minutes of cloud inactivity.&lt;br /&gt;
&lt;br /&gt;
===Define URL Structure===&lt;br /&gt;
Define the URL structure using your provided &amp;lt;code&amp;gt;[appid]&amp;lt;/code&amp;gt; and a unique &amp;lt;code&amp;gt;[sessionID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure Payload===&lt;br /&gt;
&lt;br /&gt;
All Cloud API requests must contain the following payload data:&lt;br /&gt;
&lt;br /&gt;
*''devInfo'': device and app info&lt;br /&gt;
*''metadata'': asset metadata&lt;br /&gt;
*''event metadata'': type of event&lt;br /&gt;
&lt;br /&gt;
The payload can be passed through key-values using the Nielsen reserved keys. The specific keys and descriptions are highlighted in the tables included in this section.&lt;br /&gt;
&lt;br /&gt;
'''Payload Example'''&lt;br /&gt;
&lt;br /&gt;
The example below should be referenced when following the steps for configuring the request payload.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
    &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
        &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
        &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
        &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.2 Configure Payload: metadata&lt;br /&gt;
    &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
        &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
        &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
            &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
            &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
            &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
            &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
            &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
            &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
            &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
            &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
            &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot; //ad load flag&lt;br /&gt;
            &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
            &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
        },&lt;br /&gt;
        &amp;quot;ad&amp;quot;: {&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
            &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
        }&lt;br /&gt;
    },&lt;br /&gt;
    &lt;br /&gt;
    // 3.3 Configure Payload: events&lt;br /&gt;
    &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
    &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
    &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Configure Payload: devInfo=====&lt;br /&gt;
An object &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; will need to be created to capture App and Device information.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| devId || unique ID to identify user (e.g. Advertising ID, Roku Device ID) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || app name || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apv || app build version || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| uoo || device opt-out status || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On mobile devices you will need to pass the IDFA/Ad ID as part of the devId parameter. Please see the section below regarding Opt Out and the IDFA/Ad ID.&lt;br /&gt;
&lt;br /&gt;
===== Accessing the IDFA on iOS =====&lt;br /&gt;
&lt;br /&gt;
Accessing the ID For Advertisers (IDFA) uses OS level API calls. In order to do this, you must first import the following header file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;#import &amp;lt;AdSupport/ASIdentifierManager.h&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then to receive the IDFA as a NSString, use similar code to the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;objective-c&amp;quot;&amp;gt;NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You can read more about ASIdentifierManager on Apple's [https://developer.apple.com/reference/adsupport/asidentifiermanager| developer website].&lt;br /&gt;
&lt;br /&gt;
===== Accessing the Ad ID on Android =====&lt;br /&gt;
&lt;br /&gt;
Accessing the Google Ad ID uses OS level API calls. In order to do this, you must first import Google Play Services. Then to receive the Ad ID, use the AdvertisingIdClient class as such:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;public static AdvertisingIdClient.Info getAdvertisingIdInfo (Context context)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can read more about the AdvertisingIdClient class on Google's [https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient| developer website].&lt;br /&gt;
&lt;br /&gt;
'''Example devInfo Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create devInfo object&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
  &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;,&lt;br /&gt;
  &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
  &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
  &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 3.2 Configure Payload: metadata ====&lt;br /&gt;
Asset metadata can be passed through &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt;. There are two asset types: &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; for video and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; for ads. The metadata received for each asset is used for classification and reporting.&lt;br /&gt;
&lt;br /&gt;
You will need to set up &amp;lt;code&amp;gt;&amp;quot;metadata&amp;quot;&amp;lt;/code&amp;gt; objects for &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; with the required Nielsen keys as shown in the sample code below.&lt;br /&gt;
&lt;br /&gt;
===== Content Metadata =====&lt;br /&gt;
Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of asset || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| program ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| title ||name of program (25 character limit) || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| length || length of content in seconds || &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt; (86400 for live stream) || Yes&lt;br /&gt;
|-&lt;br /&gt;
| segB || custom segment B || custom || &lt;br /&gt;
|-&lt;br /&gt;
| segC || custom segment C || custom || &lt;br /&gt;
|-&lt;br /&gt;
| airdate || the airdate in the linear TV || YYYYMMDD HH24:MI:SS || Yes&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || full episode flag || &amp;lt;code&amp;gt;&amp;quot;y&amp;quot;&amp;lt;/code&amp;gt;- full episode, &amp;lt;code&amp;gt;&amp;quot;n&amp;quot;&amp;lt;/code&amp;gt;- non full episode || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || standard episode ID || custom || Yes&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || content originator (only required for distributors) || Nielsen ||&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || type of ad load:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; Linear – matches TV ad load&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; Dynamic – Dynamic Ad Insertion (DAI)&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;2&amp;quot;&amp;lt;/code&amp;gt; - DCR measures content with dynamic ads || Yes&lt;br /&gt;
|-&lt;br /&gt;
| hasAds || ads indicator&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt;: ads included&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt;: ads not included&lt;br /&gt;
|| &amp;lt;code&amp;gt;&amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| progen || program genre abbreviation - see [[DCR OTT Genre List]] for accepted values || &amp;lt;code&amp;gt;&amp;quot;CV&amp;quot;&amp;lt;/code&amp;gt; for Comedy Variety || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example Content Object'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='json'&amp;gt;// create content object&lt;br /&gt;
&amp;quot;content&amp;quot;: {&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
    &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;,&lt;br /&gt;
    &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;,&lt;br /&gt;
    &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;,&lt;br /&gt;
    &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;,&lt;br /&gt;
    &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;,&lt;br /&gt;
    &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;,&lt;br /&gt;
    &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;,&lt;br /&gt;
    &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;,&lt;br /&gt;
    &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;,&lt;br /&gt;
    &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;,&lt;br /&gt;
    &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, &lt;br /&gt;
    &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Ad Metadata =====&lt;br /&gt;
The ad metadata should be passed for each individual ad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Keys !! Description !! Values !! Required&lt;br /&gt;
|-&lt;br /&gt;
| type || type of ad || &amp;lt;code&amp;gt;&amp;quot;preroll&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;midroll&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;postroll&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to ad || custom || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Ad Object =====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// create ad object&lt;br /&gt;
&amp;quot;ad&amp;quot;: {&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;,&lt;br /&gt;
  &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Payload: Events ===&lt;br /&gt;
&lt;br /&gt;
The last part of the payload is for enabling events so content is measured correctly when viewed. The events and required parameters are included below.&lt;br /&gt;
&lt;br /&gt;
==== Event Types ====&lt;br /&gt;
&lt;br /&gt;
The available events are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Event !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; || Playhead position in seconds. Must be passed as a whole number every 10 seconds. The final playhead position should also be sent before an asset has changed to properly capture full duration. Playhead is used to handle pause and scrubbing. When content is paused, stop passing playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt; || Complete event must be sent when the content has completed full playback.Before calling the complete event, a final playhead update with the final position is required to be sent to receive full duration credit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || The delete event must be sent when the session is completed, or terminated. After 30 minutes of inactivity, the session will expire. All creditable duration will be summarized for all asset types when delete occurs (content and ads).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Parameters =====&lt;br /&gt;
&lt;br /&gt;
The following parameters need to be passed when calling events:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Value !! Required&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;event&amp;quot;&amp;lt;/code&amp;gt; || event type || &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;complete&amp;quot;&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;&amp;quot;delete&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;position&amp;quot;&amp;lt;/code&amp;gt; || creditable position || playhead position in seconds or UTC timestamp in seconds for livestream || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;type&amp;quot;&amp;lt;/code&amp;gt; || asset type || &amp;lt;code&amp;gt;&amp;quot;content&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;quot;ad&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;utc&amp;quot;&amp;lt;/code&amp;gt; || Unix timestamp in milliseconds. Must be passed every 10 seconds. || &amp;lt;code&amp;gt;&amp;quot;1472760000000&amp;quot;&amp;lt;/code&amp;gt; || Yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example Event =====&lt;br /&gt;
You can call events by passing values in the required parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: [deviceInfo],&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: [static metadata],&lt;br /&gt;
    &amp;quot;content&amp;quot;: [content metadata],&lt;br /&gt;
    &amp;quot;ad&amp;quot;: [ad metadata]&lt;br /&gt;
  },&lt;br /&gt;
  // Event Parameters&lt;br /&gt;
  &amp;quot;event&amp;quot;: [event], // event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: [playheadPosition], //position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: [asset type], // values are &amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot; //unix timestamp in milliseconds&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The full payload including &amp;quot;devInfo&amp;quot; and &amp;quot;metadata&amp;quot; must be populated in each event request.&lt;br /&gt;
&lt;br /&gt;
===== Sample Event Lifecycle =====&lt;br /&gt;
The sample event lifecycle can be used as a reference for identifying the order for calling events and values to pass.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// Preroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Content&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content resumes at 15 minutes&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;900&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 30 minutes&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;1800&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
 &lt;br /&gt;
// Postroll&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sample Event Lifecycle - Detailed Storyline'''&lt;br /&gt;
This detailed event sequence provides additional insight for the correct events to call when handling certain playback scenarios.&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;// SESSION STARTS&lt;br /&gt;
// Start of Session: session ID created when App is opened&lt;br /&gt;
&lt;br /&gt;
// PREROLL&lt;br /&gt;
// Preroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472760000000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Preroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;15&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;}&lt;br /&gt;
 &lt;br /&gt;
// CONTENT &lt;br /&gt;
// Content Start - Start new content streams with a position of &amp;quot;0&amp;quot; incrementing the position every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472761500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content Stop Before Ad Break - Send a playhead update including the current content positon before an Ad break.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;299&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787400000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// MIDROLL&lt;br /&gt;
// Midroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Midroll Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472787500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Midroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;60&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472793500000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// CONTENT&lt;br /&gt;
// Content resumes at 5 minutes - Send playhead update with the current resumed position, and begin incrimenting the positon every 10 seconds.&lt;br /&gt;
Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472799500000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Content completes at 10:12 - Make sure to send in the playhead event with the final content position before sending the complete event.&lt;br /&gt;
Final Content Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830700000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
Complete {&amp;quot;event&amp;quot;: &amp;quot;complete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;612&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830800000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// POSTROLL&lt;br /&gt;
// Postroll Start - Start each Ad with a position of &amp;quot;0&amp;quot;, resetting to '0' for each Ad, and Ad break.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;0&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472830900000&amp;quot;} &lt;br /&gt;
&lt;br /&gt;
// Postroll Stop - End each Ad with the final position of the Ad.&lt;br /&gt;
Ad Playhead {&amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;45&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;ad&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835300000&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
// SESSION ENDS&lt;br /&gt;
&lt;br /&gt;
//End of Session: The delete event should be called when the App is exited. The values for position and type not required to be passed.&lt;br /&gt;
Delete { &amp;quot;event&amp;quot;: &amp;quot;delete&amp;quot;, &amp;quot;position&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;type&amp;quot;: &amp;quot;&amp;quot;, &amp;quot;utc&amp;quot;: &amp;quot;1472835400000&amp;quot;} &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Handling Playhead=====&lt;br /&gt;
Calling &amp;lt;code&amp;gt;&amp;quot;playhead&amp;quot;&amp;lt;/code&amp;gt; is critical for accurate duration crediting. You can reference the below guidance to determine the correct playhead position to pass depending on the playback scenario.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: General'''&lt;br /&gt;
* Playhead position must start at 0 for each new asset, and be passed at least every 10 seconds.&lt;br /&gt;
* Final postion must be sent at the end of content or an ad&lt;br /&gt;
&lt;br /&gt;
'''Playhead: Ads'''&lt;br /&gt;
* The final position must be sent when switching from content to ad, or ad to content.&lt;br /&gt;
* Each ad playhead position should be 0 at ad start.&lt;br /&gt;
* For Ad Pods, playhead must be called, and reset to 0 for each individual ad. &lt;br /&gt;
* The last content position before an Ad should be sent before switching to Ads.&lt;br /&gt;
* When content has resumed following an ad break, the playhead position update must continue where the previous content segment left off.&lt;br /&gt;
&lt;br /&gt;
'''Playhead: User Actions'''&lt;br /&gt;
* Upon user scrubbing, the current position must be sent before a user scrubs, and the new position should be sent where the user lands, and begin sending in the 10 second updates thereafter.&lt;br /&gt;
* On pause, send the current position and then discontinue sending playhead event updates.&lt;br /&gt;
* If a user exits a stream early, the last current position must be sent in a playhead update to receive accurate duration.&lt;br /&gt;
&lt;br /&gt;
===== Interruption Scenarios =====&lt;br /&gt;
&lt;br /&gt;
As part of configuring events, you will need to handle all possible interruption scenarios such as:&lt;br /&gt;
&lt;br /&gt;
*Pause / Play&lt;br /&gt;
*Network Loss (Wi-Fi / Airplane Mode / Cellular)&lt;br /&gt;
*Wi-Fi OFF / ON&lt;br /&gt;
*Call Interrupt (SIM or Third party Skype / Hangout call)&lt;br /&gt;
*Alarm Interrupt&lt;br /&gt;
*Content Buffering&lt;br /&gt;
*Device Lock / Unlock (Video players only, not for Audio players)&lt;br /&gt;
*App going Background / Foreground (Video players only, not for Audio players)&lt;br /&gt;
*App Crash or Exit&lt;br /&gt;
*Channel / Station Change Scenario&lt;br /&gt;
*Unplugging of headphone&lt;br /&gt;
&lt;br /&gt;
When playback is temporarily interrupted (e.g. pause, content buffering), the app needs to send the last known playhead position.&lt;br /&gt;
&lt;br /&gt;
*If an app is sent to background for more than 5 minutes, please create a new session ID. Otherwise, use the same session ID as before.&lt;br /&gt;
*If loss of Internet occurs, please queue the API calls that would have been made. Once Internet connectivity is regained, please spool off the API calls in order of first generated (Note: if doing so, please use the UTC time in milliseconds)&lt;br /&gt;
&lt;br /&gt;
When playback is permanently interrupted, the app needs to send delete immediately.&lt;br /&gt;
*If an app crashes, please create a new session ID. No delete call will be necessary as the previous session will timeout.&lt;br /&gt;
&lt;br /&gt;
Once playback resumes after delete occurs, a new session will need to be created with a unique session ID. All of the required metadata and events will need to be sent.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The session will automatically timeout after 30 minutes of inactivity.&lt;br /&gt;
&lt;br /&gt;
=== Example Request ===&lt;br /&gt;
&lt;br /&gt;
Now that we walked through the Cloud API integration steps, your requests should have the following components: Session ID, App ID, and Payload. You can reference the example below when your reviewing your integration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// 1. Create Session ID&lt;br /&gt;
sessionID = Date.now()+String(Math.random()*1000000 &amp;gt;&amp;gt; 0);  // Must be GUID for each viewing session&lt;br /&gt;
&lt;br /&gt;
// 2. Define URL Structure with App ID and Session ID&lt;br /&gt;
sessionURL = http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=&lt;br /&gt;
&lt;br /&gt;
// 3. Configure Payload&lt;br /&gt;
// 3.1 Configure Payload: devInfo &lt;br /&gt;
payload = {&lt;br /&gt;
 &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
   &amp;quot;devId&amp;quot;: &amp;quot;AD-ID&amp;quot;, &lt;br /&gt;
   &amp;quot;apn&amp;quot;: &amp;quot;AppName&amp;quot;,&lt;br /&gt;
   &amp;quot;apv&amp;quot;: &amp;quot;1.0&amp;quot;,&lt;br /&gt;
   &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &lt;br /&gt;
  // 3.2 Configure Payload: metadata&lt;br /&gt;
  &amp;quot;metadata&amp;quot;: {&lt;br /&gt;
    &amp;quot;static&amp;quot;: {}, // object for measuring static content&lt;br /&gt;
    &amp;quot;content&amp;quot;: { // object for measuring video content&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, // &amp;quot;content&amp;quot; for video&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;VIDEO-ID123&amp;quot;, // unique ID for video&lt;br /&gt;
      &amp;quot;isfullepisode&amp;quot;: &amp;quot;y&amp;quot;, // full episode flag&lt;br /&gt;
      &amp;quot;program&amp;quot;: &amp;quot;Program Name&amp;quot;, // program name&lt;br /&gt;
      &amp;quot;title&amp;quot;: &amp;quot;Episode Title S3 - EP1&amp;quot;, // episode name&lt;br /&gt;
      &amp;quot;length&amp;quot;: &amp;quot;1800&amp;quot;, // content duration in seconds&lt;br /&gt;
      &amp;quot;segB&amp;quot;: &amp;quot;Custom Segment B&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;segC&amp;quot;: &amp;quot;Custom Segment C&amp;quot;, // custom segment&lt;br /&gt;
      &amp;quot;crossId1&amp;quot;: &amp;quot;Standard Episode ID&amp;quot;, // episode ID&lt;br /&gt;
      &amp;quot;crossId2&amp;quot;: &amp;quot;Content Originator ID&amp;quot;, // content orginator (required for distributors)&lt;br /&gt;
      &amp;quot;airdate&amp;quot;: &amp;quot;20161013 20:00:00&amp;quot;, // airdate&lt;br /&gt;
      &amp;quot;adloadtype&amp;quot;: &amp;quot;2&amp;quot;, // ad load flag&lt;br /&gt;
      &amp;quot;hasAds&amp;quot;: &amp;quot;1&amp;quot;, // content contains ads = 1 / no ads = 0&lt;br /&gt;
      &amp;quot;progen&amp;quot;: &amp;quot;CV&amp;quot; // program genre abbreviation&lt;br /&gt;
    },&lt;br /&gt;
    &amp;quot;ad&amp;quot;: {&lt;br /&gt;
      &amp;quot;type&amp;quot;: &amp;quot;preroll&amp;quot;, // type of ad&lt;br /&gt;
      &amp;quot;assetid&amp;quot;: &amp;quot;AD-ID123&amp;quot; // unique ID for ad&lt;br /&gt;
    }&lt;br /&gt;
  },&lt;br /&gt;
    &lt;br /&gt;
  // 3.3 Configure Payload: events&lt;br /&gt;
  &amp;quot;event&amp;quot;: &amp;quot;playhead&amp;quot;, //event name&lt;br /&gt;
  &amp;quot;position&amp;quot;: &amp;quot;300&amp;quot;, // position in seconds&lt;br /&gt;
  &amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;, //&amp;quot;content&amp;quot; or &amp;quot;ad&amp;quot;&lt;br /&gt;
  &amp;quot;utc&amp;quot;: &amp;quot;1456448742000&amp;quot; //unix timestamp in milliseconds &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Append payload to URL&lt;br /&gt;
var image = new Image()&lt;br /&gt;
image.onerror = function() {&lt;br /&gt;
  // wait and send again&lt;br /&gt;
}&lt;br /&gt;
(new Image).src = sessionURL+encodeURI(JSON.stringify(payload));&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable Debug Logging ====&lt;br /&gt;
&lt;br /&gt;
Now that you have set up the Cloud API requests, you can enable debug logging to validate your integration. Enabling debug logging is required for Nielsen certification.&lt;br /&gt;
&lt;br /&gt;
==== GET Request ====&lt;br /&gt;
&lt;br /&gt;
Display GET Request to console using a name to identify each event (e.g. playhead).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event&amp;quot;, image); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Payload ====&lt;br /&gt;
&lt;br /&gt;
Output payload to identify required metadata and events.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
console.log(&amp;quot;Event Payload&amp;quot;, payload); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response Code ====&lt;br /&gt;
&lt;br /&gt;
Confirm request was completed by viewing HTTP response code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
code = msg.GetResponseCode();&lt;br /&gt;
console.log(&amp;quot;Response Code&amp;quot;, code); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can reference the HTTP Response Code table when reviewing your requests:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Status Code !! Status Text !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;200&amp;lt;/code&amp;gt; || OK || request received&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;403&amp;lt;/code&amp;gt; || Forbidden || invalid App ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;404&amp;lt;/code&amp;gt; || Not Found || JSON issue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Opt-Out ==&lt;br /&gt;
Your app must provide a means for the user to Opt-Out, or Opt-In to Nielsen Measurement. The Opt-Out requirement can be fulfilled by creating an Opt-Out/Opt-In button, toggle switch, or slider within the app &amp;quot;Settings&amp;quot;, or &amp;quot;About&amp;quot; section to allow the user selection. If you have the ability to render text within the Opt-Out screen, it is recommended to add the Privacy Information included below.&lt;br /&gt;
&lt;br /&gt;
[[File:Nielsen Opt-Out.png|link=]]&lt;br /&gt;
&lt;br /&gt;
You will need to store the User Opt-Out (uoo) status, so that it can be retrieved and populated in the &amp;lt;code&amp;gt;&amp;quot;devInfo&amp;quot;&amp;lt;/code&amp;gt; metadata which will be sent in every Cloud API event (playhead, complete, &amp;amp; delete). &lt;br /&gt;
&lt;br /&gt;
*In addition, you will need to ensure that the devId field is a blank value if a user has elected to Opt-Out&lt;br /&gt;
&lt;br /&gt;
*If the device offers &amp;quot;Limit Ad Tracking&amp;quot; or &amp;quot;Opt-Out&amp;quot; device settings, you must set uoo=true, and also ensure that the devId is set to a blank value if the user elects to enable this setting.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! uoo Key !! Description !! Values&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-In to Nielsen Measurement (Recommended Default Setting) || &amp;lt;code&amp;gt;&amp;quot;false&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| uoo || Device is Opted-Out of Nielsen Measurement || &amp;lt;code&amp;gt;&amp;quot;true&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-In JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;7be25cf9-8c40-5cc2-871e-19bf41940288&amp;quot;,&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;false&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== devInfo Opt-Out JSON Payload Example =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;devInfo&amp;quot;: {&lt;br /&gt;
    &amp;quot;apn&amp;quot;: &amp;quot;Roku Sample App&amp;quot;,&lt;br /&gt;
    &amp;quot;apv&amp;quot;: &amp;quot;1&amp;quot;,&lt;br /&gt;
    &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;, //devId must be blank when a user elects to Opt-Out.&lt;br /&gt;
    &amp;quot;uoo&amp;quot;: &amp;quot;true&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Privacy Information Template To Include In Opt-Out Screen =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
'''''ABOUT NIELSEN MEASUREMENT'''''&lt;br /&gt;
&lt;br /&gt;
Television and the way we watch it have come a long way since Nielsen began measuring TV audiences in 1950. Today, the ability to watch our favorite shows at any time and on multiple devices amplifies the need for exceptionally adept and flexible audience measurement capabilities.&lt;br /&gt;
&lt;br /&gt;
Consumers are changing with the times, and the same goes for us. As technology continues to evolve and media companies try new ways to attract viewers, understanding what consumers are watching — and what they're watching on — is more important than ever. Today, viewing video is a personal and mobile experience — anytime and anywhere. Our capabilities provide relevant metrics that are necessary to inform successful marketing and programming and drive continued growth. As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. While our digital measurement products are not used to identify you in any way, they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.&lt;br /&gt;
&lt;br /&gt;
'''''YOUR CHOICES'''''&lt;br /&gt;
&lt;br /&gt;
Nielsen believes that you should have a choice about whether to contribute to our research and insights. To opt out, or opt into Nielsen measurement please make the appropriate selection within the app. If you have this app on more than one device, you will need to opt out of this app on each device. To learn more about our digital measurement products and your choices in regard to them, please visit http://www.nielsen.com/digitalprivacy.&lt;br /&gt;
&lt;br /&gt;
'''''Disclosure Template'''''&lt;br /&gt;
&lt;br /&gt;
Additionally, you must update the App description information from the App Distribution Store with the Nielsen Measurement disclosure below:&lt;br /&gt;
&lt;br /&gt;
This app features Nielsen's proprietary measurement software which will allow you to contribute to market research, like Nielsen's TV Ratings. Please see http://www.nielsen.com/digitalprivacy for more information.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
Before providing an app build to Nielsen for testing, it is important to run validation checks once you have enabled debug logging.&lt;br /&gt;
&lt;br /&gt;
=== Payload Validation ===&lt;br /&gt;
&lt;br /&gt;
Ensure that all of the required payload data is populating while testing several videos. The following areas are critical to measurement:&lt;br /&gt;
*devInfo&lt;br /&gt;
*Asset metadata for both content, and ads&lt;br /&gt;
*Events&lt;br /&gt;
*Opt-Out status&lt;br /&gt;
&lt;br /&gt;
=== Player Events ===&lt;br /&gt;
Review event calls:&lt;br /&gt;
&lt;br /&gt;
==== playhead ====&lt;br /&gt;
*Playhead position updates every 10 seconds starting at position '0' for each new asset.&lt;br /&gt;
*Final playhead position is sent on content, or ad before switching between assets.&lt;br /&gt;
*Content metadata remains constant throughout an episode, or clip play.&lt;br /&gt;
*Ad metadata is populated appropriately for each individual ad.&lt;br /&gt;
*Playhead position update resumes for content after an ad break, and resets to 0 for each individual ad.&lt;br /&gt;
*For scrubbing, last current position should be sent while scrubbing occurs, and the new position should also be sent where the user scrubs to.&lt;br /&gt;
*Exiting a stream early should execute the last current position in a playhead update to receive accurate duration.&lt;br /&gt;
*Upon pause, the current position should be sent, and playhead updates should stop incrementing until resume play occurs.&lt;br /&gt;
&lt;br /&gt;
==== complete ====&lt;br /&gt;
*Check that the complete event executes upon content complete after the final playhead update is sent&lt;br /&gt;
*Do not execute the complete event for ads&lt;br /&gt;
&lt;br /&gt;
==== delete ====&lt;br /&gt;
*Check to see that the delete event occurs upon app exit&lt;br /&gt;
&lt;br /&gt;
==== GET Request Format ====&lt;br /&gt;
*Ensure that the event payloads are formatted in JSON&lt;br /&gt;
*Check to see that each of the Cloud API GET requests are properly encoded&lt;br /&gt;
&lt;br /&gt;
==== HTTP Response ====&lt;br /&gt;
*Make sure that each of the Cloud API Get requests are received by the Nielsen Cloud API properly through use of the HTTP Response Code outputs enabled in console.&lt;br /&gt;
&lt;br /&gt;
==== Opt-Out ====&lt;br /&gt;
*Test the &amp;quot;uoo&amp;quot; key gets populated accurately for both Opt-In and Opt-Out selections by validating the Cloud API events called after the user Opt-Out/Opt-In selection.&lt;br /&gt;
*Test that the devId field is populated with a blank value if a user has elected to Opt-Out. For example: &amp;quot;devId&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
*If the device supports &amp;quot;Limit Ad Tracking&amp;quot; or has device &amp;quot;Opt-Out&amp;quot; settings, test that uoo=true, and that devId is set to a blank value if enabled in the device settings.&lt;br /&gt;
&lt;br /&gt;
== Go Live ==&lt;br /&gt;
After your integration has been certified, you will need to: Change Endpoint and Disable Logging.&lt;br /&gt;
&lt;br /&gt;
'''Change Endpoint:''' You will need to update to the production endpoint:&lt;br /&gt;
&lt;br /&gt;
*Testing: &amp;lt;code&amp;gt;http://sandbox.cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
*Production: &amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your production URL structure should now be:&lt;br /&gt;
&amp;lt;code&amp;gt;https://cloudapi.imrworldwide.com/nmapi/v2/[appid]/[sessionID]/a?b=[payload]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disable Logging:''' You can now disable debug logging&lt;/div&gt;</summary>
		<author><name>RyanCarlson</name></author>
	</entry>
</feed>