<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nielsentest.mywikis.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndrewKlaasse</id>
	<title>Engineering Client Portal - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://nielsentest.mywikis.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndrewKlaasse"/>
	<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/wiki/Special:Contributions/AndrewKlaasse"/>
	<updated>2026-05-14T02:08:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Static_Lite_Browser_SDK&amp;diff=1161</id>
		<title>DCR Static Lite Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Static_Lite_Browser_SDK&amp;diff=1161"/>
		<updated>2017-08-14T17:13:18Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: updated whole 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;
== Overview ==&lt;br /&gt;
DCR Static Lite &amp;lt;Page Measurement&amp;gt; allows clients to measure the time spent by users on static content (in focus). Unlike Video measurement, the Static Lite &amp;lt;Page Measurement&amp;gt; does not require a configuration file.&lt;br /&gt;
* The cadence of the View and Duration pings for DCR Static Lite is same as Video content. (View ping when content is loaded completely and Duration ping every 5 minutes following that).&lt;br /&gt;
* View ping gets triggered when content is loaded completely and Duration ping every 5 minutes following that irrespective of the page being in focus (duration is calculated by c27 param for the amount of time user is on the page)&lt;br /&gt;
DCR Static Lite &amp;lt;Page Measurement&amp;gt; is a compact version of DCR Static &amp;lt;Page Measurement&amp;gt; with the following primary differences.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Static &amp;lt;Page Measurement&amp;gt; !! Static Lite &amp;lt;Page Measurement&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Requires a configuration file. || Does not require a configuration file.&lt;br /&gt;
|-&lt;br /&gt;
| Duration ping cadence is every 30 minutes. || Duration ping cadence is every 5 minutes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
To get started, an App ID is needed. The App ID is a unique ID assigned to the site. 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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== DCR Static Lite Implementation ==&lt;br /&gt;
To implement DCR Static Lite &amp;lt;Page Measurement&amp;gt;, only a single script tag reference is required on the page. Static Lite will automatically initialize and handle pings once the page loads completely.&lt;br /&gt;
&lt;br /&gt;
Append the parameters as hashbang URL parameters, starting with a hash (#) in place of a query string (?).&lt;br /&gt;
* The use of hashbang parameters provides the ability for the browser to cache DCR static script file as hashbang parameters are not sent to the server when requesting for the file.&lt;br /&gt;
Below is an example of a DCR static &amp;lt;script&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
'''with HTTPS URL'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;&amp;lt;script async src=&amp;quot;https://seccdn-gl.imrworldwide.com/novms/js/2/nlsDcrLite510.min.js#nol_sfcode=dcr-cert&amp;amp;nol_ci=AB-XXXXXX&amp;amp;nol_apid=TXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;amp;nol_assetname=My_assetname&amp;amp;nol_apn=My_AppName&amp;amp;nol_ad=0&amp;amp;nol_vc=b02&amp;amp;nol_devid=XXXX-XXXX-XXXX&amp;amp;nol_segA=NA&amp;amp;nol_segB=NA&amp;amp;nol_segC=NA&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''with HTTP URL'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang='javascript'&amp;gt;&amp;lt;script async src=&amp;quot;http://cdn-gl.imrworldwide.com/novms/js/2/nlsDcrLite510.min.js#nol_sfcode=dcr-cert&amp;amp;nol_ci=AB-XXXXXX&amp;amp;nol_apid=TXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;amp;nol_assetname=My_assetname&amp;amp;nol_apn=My_AppName&amp;amp;nol_ad=0&amp;amp;nol_vc=b02&amp;amp;nol_devid=XXXX-XXXX-XXXX&amp;amp;nol_segA=NA&amp;amp;nol_segB=NA&amp;amp;nol_segC=NA&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Performance Tip'''&lt;br /&gt;
&amp;lt;blockquote&amp;gt;It is recommended to include the '''&amp;quot;async&amp;quot;''' attribute in the script tag to asynchronously load the script and allow the DOM to continue processing. This provides a non-blocking loading of DCR static, providing better page load performance and minimal affects to additional scripts or page processing.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tag Parameters ==&lt;br /&gt;
The parameters for the script tag are defined below. These parameters will automatically be loaded into DCR Static Lite once the page is loaded completely. These are the only parameters supported by the tag.&lt;br /&gt;
&lt;br /&gt;
'''Parameter Definition'''&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description !! Required? !! Specified by !! Example&lt;br /&gt;
|-&lt;br /&gt;
| nol_sfcode || Location of collection environment.  || Yes || Nielsen || dcr&lt;br /&gt;
|-&lt;br /&gt;
| nol_ci || Brand level aggregation || Yes || Nielsen || My_ClientID&lt;br /&gt;
|-&lt;br /&gt;
| nol_apid || UniqueID assigned to player/site. || Yes || Nielsen || PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&lt;br /&gt;
|-&lt;br /&gt;
| nol_assetname || Section of each site (e.g. section value should be first &amp;lt;br /&amp;gt;&lt;br /&gt;
level in page URL: website.com/section). Limit to 25 unique values &lt;br /&gt;
|| Yes &lt;br /&gt;
|| Client &lt;br /&gt;
|| My_assetname&lt;br /&gt;
|-&lt;br /&gt;
| nol_apn || User-defined string value for describing the player/site. || Yes || Client || My_AppName&lt;br /&gt;
|-&lt;br /&gt;
| nol_vc || Sub-brand level aggregation || Yes || Client || VCID&lt;br /&gt;
|-&lt;br /&gt;
| nol_segA || Segment A custom segment for reporting || No || Client || NA&lt;br /&gt;
|-&lt;br /&gt;
| nol_segB || Segment B custom segment for reporting || No || Client || NA&lt;br /&gt;
|-&lt;br /&gt;
| nol_segC || Segment C custom segment for reporting || No || Client || NA&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;
&lt;br /&gt;
== Advanced Tag Implementation ==&lt;br /&gt;
DCR Static Lite ensures that clients have a prior knowledge of the values for the parameters, they also offer the option of dynamically binding these parameters to the script tag.&lt;br /&gt;
&lt;br /&gt;
Below is an example of how to bind Dynamic Parameters to the script tag.&lt;br /&gt;
&lt;br /&gt;
In the HTML &amp;lt;head&amp;gt; section of each page, add the script snippet as shown below.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Note: This tagging is an alternative way of dynamically passing parameters to Static Lite in replacement of the standard &amp;lt;script&amp;gt; tag implementation.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script type= &amp;quot;text/javascript&amp;quot; async&amp;gt;&lt;br /&gt;
var _nolParams = &lt;br /&gt;
{&lt;br /&gt;
  nol_sfcode: 'dcr',&lt;br /&gt;
  nol_ci: 'My_ClientID',&lt;br /&gt;
  nol_apid: 'PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',&lt;br /&gt;
  nol_apn: 'My_AppName',&lt;br /&gt;
  nol_vc: 'My_vcID',&lt;br /&gt;
  nol_segA: 'NA',&lt;br /&gt;
  nol_segB: 'NA',&lt;br /&gt;
  nol_segC: 'NA',&lt;br /&gt;
  nol_assetname: 'My_assetname'&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
/* This function dynamically builds the script tag and injects it into the page */&lt;br /&gt;
 &lt;br /&gt;
(function (params) &lt;br /&gt;
{&lt;br /&gt;
  var url = 'https://cdn-gl.imrworldwide.com/novms/js/2/nlsDcrLite510.min.js#'; // Only for HTTPS URLs &lt;br /&gt;
  var url = 'http://cdn-gl.imrworldwide.com/novms/js/2/nlsDcrLite510.min.js#'; // Only for HTTP URLs &lt;br /&gt;
  var query = [];&lt;br /&gt;
  for (var param in params)&lt;br /&gt;
{&lt;br /&gt;
  query.push(param + '=' + params[param]);&lt;br /&gt;
}// for&lt;br /&gt;
url += query.join('&amp;amp;');&lt;br /&gt;
var script = window.document.createElement(&amp;quot;script&amp;quot;);&lt;br /&gt;
script.async = true;&lt;br /&gt;
script.src = url;&lt;br /&gt;
window.document.getElementsByTagName('head')[0].appendChild(script);&lt;br /&gt;
})(_nolParams);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&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 user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content similar to http://secure-us.imrworldwide.com/nielsen_app_optout.html should be displayed.&lt;br /&gt;
*For more details, refer to [[Browser SDK API Reference#Browser Opt-Out Implementation|Browser SDK API Reference - Browser Opt-Out Implementation]] and Nielsen Digital Privacy.&lt;br /&gt;
&lt;br /&gt;
== Pre-Certification Checklists ==&lt;br /&gt;
After the website is ready to be sent for Nielsen Certification, please go through the Pre-Certification Checklist and ensure the webpage behaves as expected, before submitting to Nielsen.&lt;br /&gt;
&lt;br /&gt;
== Testing an Implementation - Browser ==&lt;br /&gt;
See [[Digital Measurement Testing]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1157</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1157"/>
		<updated>2017-08-10T21:35:05Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/ &amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/ &amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/ &amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
&amp;lt;br /&amp;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;
&amp;lt;br/ &amp;gt;&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; 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 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;
&amp;lt;br/&amp;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;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br /&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1156</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1156"/>
		<updated>2017-08-10T21:34:34Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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; 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 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;
&amp;lt;br/&amp;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;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br /&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1155</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1155"/>
		<updated>2017-08-10T21:34:09Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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; 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 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;
&amp;lt;br/&amp;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;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br /&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1154</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1154"/>
		<updated>2017-08-10T21:33:23Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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; 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 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;
&amp;lt;br/&amp;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;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;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;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br /&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1153</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1153"/>
		<updated>2017-08-10T21:31:12Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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; 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 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;
&amp;lt;br/&amp;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;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1152</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1152"/>
		<updated>2017-08-10T21:30:35Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1151</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1151"/>
		<updated>2017-08-10T21:28:36Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1150</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1150"/>
		<updated>2017-08-10T21:27:32Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1149</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1149"/>
		<updated>2017-08-10T21:27:01Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1148</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1148"/>
		<updated>2017-08-10T21:26:38Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;apid: &amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;  &amp;lt; /syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1147</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1147"/>
		<updated>2017-08-10T21:01:35Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: style edits&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;
&amp;lt;br /&amp;gt;&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configure SDK ==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1146</id>
		<title>DCR Video Browser SDK</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=DCR_Video_Browser_SDK&amp;diff=1146"/>
		<updated>2017-08-10T21:00:01Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: xx&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;
&amp;lt;br /&amp;gt;&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;
&amp;lt;br /&amp;gt;&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Static Queue Snippet'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Add the following script tag to the website:&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&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;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br /&amp;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;
&amp;lt;br/&amp;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;
 &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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Example SDK Configuration'''&lt;br /&gt;
&amp;lt;br/&amp;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;javascript&amp;quot;&amp;gt; &lt;br /&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;
&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;
''Content Metadata''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Content metadata should remain constant throughout the completion of an episode / clip including the ads play.&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;
| 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;
| hasAds	|| identify if content includes Ads ||&lt;br /&gt;
*“0” – no ads &lt;br /&gt;
“1” – includes Ads &lt;br /&gt;
“2” – unknown (default)	&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; &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;
  hasAds:         '1'&lt;br /&gt;
};&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.&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;  &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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
'''Call Nielsen APIs'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
The method for calling events is ggPM().&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;
 &lt;br /&gt;
nSdkInstance.ggPM('event', parameter, ...);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Interrupt Scenarios ==&lt;br /&gt;
&lt;br /&gt;
=== Pause Event ===&lt;br /&gt;
&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;
&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;
&amp;lt;br/&amp;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;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&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;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== SDK Playhead 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;  &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;
 &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;
&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;
&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;
The following paragraph is a template for an opt-out statement.&lt;br /&gt;
&amp;lt;Br/&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;br/&amp;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;
'''Going Live'''&lt;br /&gt;
&amp;lt;br/&amp;gt;&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;
&amp;lt;br/&amp;gt;&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;
&lt;br /&gt;
var nSdkInstance = NOLBUNDLE.nlsQ(&amp;quot;PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&amp;quot;, &amp;quot;nlsnInstance&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1137</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1137"/>
		<updated>2017-08-09T21:45:20Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: style updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type &lt;br /&gt;
*0: Custom station built per user &lt;br /&gt;
*1: OTA streaming station with the same ad load &lt;br /&gt;
*2: OTA station with a different ad load &lt;br /&gt;
*3: Multicast eRadio or online station &lt;br /&gt;
*4: On Demand Audio (podcasting) &lt;br /&gt;
|| 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP.  &lt;br /&gt;
&lt;br /&gt;
=== Configure Browser SDK ===&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&lt;br /&gt;
'''Add Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&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;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&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;
&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;
&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;
&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;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || 	'XXXXXXXX-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;
&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&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;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK601.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;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1136</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1136"/>
		<updated>2017-08-09T21:40:52Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: styling edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type &lt;br /&gt;
*0: Custom station built per user &lt;br /&gt;
*1: OTA streaming station with the same ad load &lt;br /&gt;
*2: OTA station with a different ad load &lt;br /&gt;
*3: Multicast eRadio or online station &lt;br /&gt;
*4: On Demand Audio (podcasting) &lt;br /&gt;
|| 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP.  &lt;br /&gt;
&lt;br /&gt;
=== Configure Browser SDK ===&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&lt;br /&gt;
'''Add Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&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;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&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;
&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;
&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;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || 	'XXXXXXXX-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;
&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&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;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK601.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;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1135</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1135"/>
		<updated>2017-08-09T21:37:54Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: styling edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type &lt;br /&gt;
*0: Custom station built per user &lt;br /&gt;
*1: OTA streaming station with the same ad load &lt;br /&gt;
*2: OTA station with a different ad load &lt;br /&gt;
*3: Multicast eRadio or online station &lt;br /&gt;
*4: On Demand Audio (podcasting) &lt;br /&gt;
|| 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP.  &lt;br /&gt;
&lt;br /&gt;
=== Configure Browser SDK ===&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&lt;br /&gt;
'''Add Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&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 type=&amp;quot;text/javascript&amp;quot;&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;
(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;
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;
&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;
&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;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || 	'XXXXXXXX-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;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;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&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;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK601.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;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1134</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1134"/>
		<updated>2017-08-09T21:35:37Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: styling edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type &lt;br /&gt;
#Custom station built per user &lt;br /&gt;
#OTA streaming station with the same ad load &lt;br /&gt;
#OTA station with a different ad load &lt;br /&gt;
#Multicast eRadio or online station &lt;br /&gt;
#On Demand Audio (podcasting) &lt;br /&gt;
|| 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP.  &lt;br /&gt;
&lt;br /&gt;
=== Configure Browser SDK ===&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&lt;br /&gt;
'''Add Static Queue Snippet'''&lt;br /&gt;
&lt;br /&gt;
*Add Static Queue Snippet&lt;br /&gt;
*Create SDK Instance&lt;br /&gt;
&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 type=&amp;quot;text/javascript&amp;quot;&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;
(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;
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;
&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;
&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;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || 	'XXXXXXXX-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;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;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&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;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK601.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;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&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;
(window,&amp;quot;NOLBUNDLE&amp;quot;);&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;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1133</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1133"/>
		<updated>2017-08-09T20:34:17Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: updated to bj600 code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type 0: Custom station built per user 1: OTA streaming station with the same ad load 2: OTA station with a different ad load 3: Multicast eRadio or online station 4: On Demand Audio (podcasting) || 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP.  &lt;br /&gt;
&lt;br /&gt;
=== Configure Browser SDK ===&lt;br /&gt;
There are two steps required for configuring the SDK:&lt;br /&gt;
&lt;br /&gt;
Add Static Queue Snippet&lt;br /&gt;
Create SDK Instance&lt;br /&gt;
&lt;br /&gt;
Add Static Queue Snippet&lt;br /&gt;
&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 type=&amp;quot;text/javascript&amp;quot;&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;
(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;
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;
&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;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || 	'XXXXXXXX-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;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;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&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;
Once the configuration is downloaded, the SDK itself will be downloaded and initialized. All SDK modules are included in one file: “nlsSDK601.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;
&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;
!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;
  // 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;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1092</id>
		<title>Browser SDK API Reference</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=Browser_SDK_API_Reference&amp;diff=1092"/>
		<updated>2017-08-02T21:09:26Z</updated>

		<summary type="html">&lt;p&gt;AndrewKlaasse: section 1: updated tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
&lt;br /&gt;
== Setting up Development Environment ==&lt;br /&gt;
=== Step 1: Configure Content Management System (CMS) ===&lt;br /&gt;
Configure CMS to send the required values (see table below). Any internal CMS_variable names can be used for passing the data.&lt;br /&gt;
&lt;br /&gt;
Ensure to capture these CMS_variable names in the SDK Configuration Form.&lt;br /&gt;
&lt;br /&gt;
For more information on setting variable names, see the SDK Configuration Form included within the SDK package.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc || Used when both CMS metadata and ID3 data are present in the player. Setting this field tells the SDK whether to use the CMS metadata or the ID3 payload to derive the pings || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of asset: ad or content || preroll, midroll, postroll, or content&lt;br /&gt;
|-&lt;br /&gt;
| assetid || unique ID assigned to asset || custom&lt;br /&gt;
|-&lt;br /&gt;
| OCR Tag || OCR tag provided by Nielsen for implementation on the ad unit || Complete OCR URL&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 || Length in seconds, 86400 for live stream&lt;br /&gt;
|-&lt;br /&gt;
| adloadtype || Type of ad load || &amp;quot;1&amp;quot; - Linear &amp;quot;2&amp;quot; Dynamic(default)&lt;br /&gt;
|-&lt;br /&gt;
| hadAds || Identify if content includes Ads ||  &amp;quot;0&amp;quot; - no ads &amp;quot;1&amp;quot; - includes ads &amp;quot;2&amp;quot; unknown(default)&lt;br /&gt;
|-&lt;br /&gt;
| isfullepisode || Full episode flag	|| &amp;quot;y&amp;quot; - full episode &amp;quot;n&amp;quot; - non full episode&lt;br /&gt;
|-&lt;br /&gt;
| segA || Segment A (this is not available for video reporting as the episode title is reported) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segB || Custom segment B || custom value&lt;br /&gt;
|-&lt;br /&gt;
| segC || Custom segment C || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId1 || Standard episode ID || custom value&lt;br /&gt;
|-&lt;br /&gt;
| crossId2 || Content originator (required only for distributors) || custom value&lt;br /&gt;
|-&lt;br /&gt;
| airdate || Original air date and time in Eastern Time. For non-US countries, it should be local time. || YYYYMMDD HH24:MI:SS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Content Management System for Digital Audio ====&lt;br /&gt;
Digital Audio measurement is for digital-only audio content. For Digital Audio, clients should provide the parameters shown in CMS Table for Digital Audio.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Required Data !! Description !! Value&lt;br /&gt;
|-&lt;br /&gt;
| dataSrc ** || Source of the data. For Digital Audio, pass dataSrc as “cms”. || cms&lt;br /&gt;
|-&lt;br /&gt;
| type || Type of content . For Digital Audio, set type as “radio”. || radio&lt;br /&gt;
|-&lt;br /&gt;
| assetid || Station identifier, should include call letters and band. || WXYZ-FM&lt;br /&gt;
|-&lt;br /&gt;
| stationType || OTA station flag and / or OTA station type 0: Custom station built per user 1: OTA streaming station with the same ad load 2: OTA station with a different ad load 3: Multicast eRadio or online station 4: On Demand Audio (podcasting) || 0, 1, 2, 3, or 4&lt;br /&gt;
|-&lt;br /&gt;
| provider || Name of Provider || XYZ Provider&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Complete the Nielsen SDK Configuration Form ===&lt;br /&gt;
The SDK is designed to map the &amp;lt;code&amp;gt;CMS_variable names&amp;lt;/code&amp;gt;. To support the custom mapping, the developer is required to complete the SDK Configuration Form. The form will be provided during onboarding along with this guide.&lt;br /&gt;
&lt;br /&gt;
== Initialization ==&lt;br /&gt;
=== Obtain the Nielsen Application ID (apid) and Browser SDK URLs ===&lt;br /&gt;
The Nielsen &amp;lt;code&amp;gt;apid&amp;lt;/code&amp;gt; is required to enable SDK functionality. Technical Account Manager will provide an apid for each player configuration.  &lt;br /&gt;
Browser SDK can support URLs that use any of the protocols – HTTPS and HTTP. Contact the Technical Account Manager to get the appropriate Browser SDK package that suits the requirements.&lt;br /&gt;
&lt;br /&gt;
=== Initialize Browser SDK ===&lt;br /&gt;
To initialize the SDK, parameters must be passed when calling the initialization function (&amp;lt;code&amp;gt;ggInitialize&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Create a global object with the values for the required parameters (sfcode, apid, apn, and nol_sdkDebug).&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;
var _nolggGlobalParams =&lt;br /&gt;
{&lt;br /&gt;
  apid: &amp;quot;XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX&amp;quot;,&lt;br /&gt;
  sfcode: &amp;quot;dcr-cert&amp;quot;,&lt;br /&gt;
  apn: &amp;quot;sample player name / site name&amp;quot;,&lt;br /&gt;
  nol_sdkDebug: &amp;quot;console&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' Use the debug parameter, nol_sdkDebug, for testing only. Remove the parameter before moving to production.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To initialize the SDK , use the following methods:&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;
var gg = window.NOLCMB.getInstance(instanceName /*optional*/);&lt;br /&gt;
gg.ggInitialize(window._nolggGlobalParams);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If no parameters are passed to getInstance(), the default instance name is used.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' To create a new instance of the player, send a different / new unique string. Sending the same unique string re-initializes the existing instance of the player.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' To measure static content on a page and integrate the SDK with a player for video measurement, it is recommended to create one SDK instance using &amp;lt;code&amp;gt;_nolggGlobalParams.apid&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SDK Initialization – Global Parameters ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameters !! Description !! Value !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| apid || UniqueID assigned to player/site. || Nielsen provided || Yes&lt;br /&gt;
|-&lt;br /&gt;
| apn || User-defined string value for describing the player/site. || Client provided || Yes&lt;br /&gt;
|-&lt;br /&gt;
| sfcode || Location of collection environment. During testing, all traffic should be directed to &amp;quot;dcr-cert&amp;quot;. || &amp;quot;dcr-cert&amp;quot; – testing &amp;quot;dcr&amp;quot; – production || Yes&lt;br /&gt;
|-&lt;br /&gt;
| nol_sdkDebug || Enables Debug Mode which allows output to be viewed in console. || &amp;quot;console&amp;quot; || No&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note:''' The debug parameter, &amp;lt;code&amp;gt;nol_sdkDebug&amp;lt;/code&amp;gt;, is only used for testing and should be removed before moving to production. The output is displayed in console debuggers when enabled.&amp;lt;/code&amp;gt;.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser SDK API Methods &amp;amp; Properties ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method / Property !! Event # !! DTVR !! DAR !! Digital Audio !! DCR !! International (Germany) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[loadMetadata (Browser)]] || 3 || ✔ || ✔ || ✔ || ✔ || ✔ || Used when there is a preroll ad that needs to be associated with content metadata. The loadMetadata will first be called to populate the content metadata values and then the loadMetadata for ad metadata will be called. This allows sending a content ping with the ad info, even if the user bails out during the preroll ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[play (Browser)]] || 5 || ✔ || ✘ || ✘ || ✔ || ✔ || Used when there is an ID3 fed product such as DTVR and the client does not want to send in all the CMS metadata that is sent in loadMetadata. This allows the client to send in at least the required “channel name” value associated to the ID3 feed. When the client passes in the channelName, they can change the CMS data stored by passing new values. If this event is not called then the “channel name” value populated will be the default value of “defaultChannelName”.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
'''VA Beacon:''' Called when content or ads start playing. The playhead position must be passed.&lt;br /&gt;
|-&lt;br /&gt;
| [[sendID3 (Browser)]] || 55 || ✔ || ✘ || ✘ || ✘ || ✘ || Used to send the ID3 metadata.&lt;br /&gt;
|-&lt;br /&gt;
| [[setPlayheadPosition (Browser)]] || 49 || ✘ || ✘ || ✔ || ✔ || ✔ || Used to send the playhead position.&lt;br /&gt;
|-&lt;br /&gt;
| [[stop (Browser)]] || 7 || ✘ || ✘ || ✘ || ✔ || ✔ || Used when switching between ad and content or content and ad.&lt;br /&gt;
|-&lt;br /&gt;
| [[end (Browser)]] || 57 || ✔ || ✘ || ✔ || ✔ || ✔ || This is triggered 1) at the end of the content stream, 2) if the user switches to another piece of content 3) when the browser is refreshed or closed&lt;br /&gt;
|-&lt;br /&gt;
| [[staticstart (Browser)]] || 14 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to send the metadata for the static page.&lt;br /&gt;
|-&lt;br /&gt;
| [[getOptOutStatus (Browser)]] || 4 || ✘ || ✘ || ✘ || ✘ || ✔ || '''VA Beacon Only:''' Sent only after calling stop. The current position must be passed. Not needed for new International (Germany) implementations.&lt;br /&gt;
|-&lt;br /&gt;
| [[updateOTT (Browser)]] || - || ✘ || ✘ || ✘ || ✘ || ✔ || Used to notify Browser SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
|-&lt;br /&gt;
| [[ onPaginate (Browser)]] || 30 || ✘ || ✘ || ✘ || ✔ || ✔ || Used to create a new instance of the SDK object&lt;br /&gt;
|-&lt;br /&gt;
| [[updateMetadata (Browser)]] || 35 || ✔ || ✔ || ✔ || ✔ || ✔ || This event is used for updating metadata parameters for the content or ad that is being played.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Retrieving ID3 Tags ==&lt;br /&gt;
The video player must have the ability to extract ID3 tags and supply them to the Browser SDK, based on the HLS standard.&lt;br /&gt;
*An ID3 tag spans two PES packets.&lt;br /&gt;
**In the first PES packet, look for www.nielsen.com, this is the start of the ID3 tag. Continue to parse the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
**In the second PES packet, identify the end pattern – a regEx of /(\/\d+){3}/ and look to remove the lowest index of either &amp;quot;\x00&amp;quot; and/or &amp;quot;\ufffd&amp;quot;. Now the second packet has been appended and the demarcation of the Nielsen-specific data has been defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Follow the procedure below, to extract Nielsen ID3 tags from an MPEG-2 transport stream (including HLS streams).&lt;br /&gt;
#Parse the Program Map Table (PMT) to find the PID of the metadata stream. Confirm the presence of the metadata descriptor described in section 2.3.3 of Apple’s “HTTP Live Streaming Metadata Spec.pdf”. Only private streams with metadata descriptor present should be considered as ID3-tag metadata streams.&lt;br /&gt;
#Parse the HLS/Transport stream for any '''PES header''' with the PID found in step 1.&lt;br /&gt;
#Follow standard MPEG-2 parsing procedures to locate the start of the payload of the PES packet.&lt;br /&gt;
#Copy the PES payload into a buffer.&lt;br /&gt;
#The ID3 tag spans 2 PES packets. Parse the stream for the next packet whose PID is set to the PID found in step 1. Typically the ID3 Tag is of 249 bytes. The steps below guide towards extraction of the ID3 tag&lt;br /&gt;
##In the first PES packet, look for &amp;quot;www.nielsen.com&amp;quot; , this is the start of the ID3 tag. Keep on parsing the first PES packet until the undefined char &amp;quot;\ufffd&amp;quot; is found. This forms the first half of the ID3 tag&lt;br /&gt;
##In the second PES packet, identify the end pattern, a regEx of /(\/\d+){3}/ and look to remove the lowest index of either “\x00” and/or “\ufffd”. Now the second packet has been appended and the demarcation of the Nielsen specific data has been defined. This segment can be simply substringed.&lt;br /&gt;
##Concatenate this substringed segment with the payload derived from the first packet get the ID3 payload.&lt;br /&gt;
#Check the length of the contents in the buffer to make sure that it is equal to the size of a Nielsen ID3 tag.&lt;br /&gt;
#Ensure that the ID3 byte array is converted into the string and escape it, so that the SDK can consume it.&lt;br /&gt;
Repeat steps 2 through 7 for all ID3 tags in the stream.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
*[http://www.iso.org/iso/catalogue_detail?csnumber=44169. ISO/IEC 13818-1:2007] Information technology – Generic coding of moving pictures and associated audio information: Systems&lt;br /&gt;
*https://developer.apple.com/library/ios/sdk/developers/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf&lt;br /&gt;
&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;
== Browser Opt-Out Implementation ==&lt;br /&gt;
The site in which video content is being measure via Nielsen methodology must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
For Browser-based applications, opt-out setting is stored via Nielsen cookie. Therefore, it is only necessary that users be made aware of measurement opt-out by incorporating the template below in the user interface.&lt;br /&gt;
&lt;br /&gt;
=== Sample Opt Out Template ===&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, see http://www.nielsen.com/digitalprivacy. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Nielsen Privacy Requirements ==&lt;br /&gt;
Privacy protections that Nielsen ensures to have with each App SDK integration are as follows.&lt;br /&gt;
*Disclosure of viewership data collection in app store description&lt;br /&gt;
*Disclosure of viewership data collection in EULA / Privacy Policy&lt;br /&gt;
*A link in the EULA/Privacy policy, or in another conspicuous location within the App, to a Nielsen-hosted web page outlining what Nielsen is collecting and how it is being used&lt;br /&gt;
*Method for users to opt-out of Nielsen measurement, any time while using the application&lt;br /&gt;
&lt;br /&gt;
=== Ratings Data Flow ===&lt;br /&gt;
Every view of creditable and watermarked content is measured by Nielsen.&lt;br /&gt;
[[File:RatingsDataFlow.png]]&lt;br /&gt;
&lt;br /&gt;
'''Information NOT Shared'''&lt;br /&gt;
* '''With Nielsen'''&lt;br /&gt;
** User's Identity&lt;br /&gt;
* '''With Data Provider'''&lt;br /&gt;
** Content information&lt;br /&gt;
** Whether user is viewing an ad or video content&lt;br /&gt;
** Player used to play the streaming (audio / video, etc.)&lt;br /&gt;
** Values being de-duped / aggregating for&lt;br /&gt;
&lt;br /&gt;
Nielsen collects only what it needs for audience measurement. Every view of creditable, watermarked content will be measured by Nielsen.&lt;br /&gt;
&lt;br /&gt;
=== Data Collected ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Type of Information !! Parameter !! Transmitted to Nielsen? !! Sent to Provider?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; | Nielsen ID3 Watermark&lt;br /&gt;
|-&lt;br /&gt;
| FinalDistributor Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Program Content Timestamp || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Mobile Breakout Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Commercial Credit Code – Linear or Dynamic || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Time ShiftedViewing Code || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment Number || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Segment View Pattern || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Device/App Info&lt;br /&gt;
|-&lt;br /&gt;
| Device OSVersion || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Device Model || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Cache Buster || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKDisabled Flag || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| ServerCode || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Channel or URL || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;9&amp;quot; | Nielsen Identifiers&lt;br /&gt;
|-&lt;br /&gt;
| Client ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Campaign ID || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| Nielsen Unique Device ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| Application ID || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| DeviceGroup (ex. Tablet, Smartphone, Desktop) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| OS Group (ex. Android, iOS, Windows) || Yes || Yes &lt;br /&gt;
|-&lt;br /&gt;
| SDKVersion || Yes || No&lt;br /&gt;
|-&lt;br /&gt;
| IP Address for DMA, Country Code || Yes || Yes &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Note''': Data is hashed, and encrypted using AES 128 before transmission to data provider.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Example ping sent to provider ====&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://provider.com/cgi-bin/brandlift.php&amp;lt;/nowiki&amp;gt;?campaign_id=ff12725d724fac7934cf6003f096b4cd&amp;lt;wbr /&amp;gt;&amp;amp;placement_id=a4164b8fba9ee7c873a9c72c7091bb58&amp;lt;wbr /&amp;gt;&amp;amp;creative_id=25280139b61a947e127a52f56c8a2fdd&amp;lt;wbr /&amp;gt;&amp;amp;segment1=9000&amp;lt;wbr /&amp;gt;&amp;amp;segment2=41&amp;lt;wbr /&amp;gt;&amp;amp;segment3=iOS&amp;lt;wbr /&amp;gt;&amp;amp;OSVer=iOS6.1&amp;lt;wbr /&amp;gt;&amp;amp;c9=&amp;lt;wbr /&amp;gt;&amp;amp;devgrp=tablet&amp;lt;wbr /&amp;gt;&amp;amp;h=f5f243fe6d&amp;lt;wbr /&amp;gt;&amp;amp;rnd=1376971827360&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This ping passes the following parameters to the provider:&lt;br /&gt;
* Campaign ID – (campaign, placement, creative)&lt;br /&gt;
* Country Code&lt;br /&gt;
* DMA&lt;br /&gt;
* OS Group (ex. iOS, Android)&lt;br /&gt;
* DeviceOS Version&lt;br /&gt;
* Device Advertiser ID&lt;br /&gt;
* DeviceGroup (ex. Tablet, Smartphone, Desktop)&lt;br /&gt;
* Cache Buster&lt;br /&gt;
&lt;br /&gt;
=== Nielsen Measurement 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, it is mandatory to 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;
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;
&lt;br /&gt;
&amp;lt;blockquote&amp;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.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information, please see Opt-Out Implementation below.&lt;br /&gt;
&lt;br /&gt;
=== Opt-Out Implementation ===&lt;br /&gt;
The site must provide the means for the user to opt-out of, or opt back into Nielsen Measurement.&lt;br /&gt;
&lt;br /&gt;
'''Sample Opt Out Template'''&lt;br /&gt;
&lt;br /&gt;
Our properties may feature Nielsen’s proprietary measurement software which will allow to contribute to market research, like Nielsen’s TV Ratings. To learn more about this information, please [http://www.nielsen.com/digitalprivacy| click here]. Nielsen’s software may collect your choices with regards to it.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
See [[Digital Measurement Testing#Testing Browser Implementation|Digital Measurement Testing - Testing Browser Implementation]].&lt;/div&gt;</summary>
		<author><name>AndrewKlaasse</name></author>
	</entry>
</feed>