DCR Static VHL: Difference between revisions

From Engineering Client Portal

(d)
 
(17 intermediate revisions by 2 users not shown)
Line 8: Line 8:
== Implementation Steps ==
== Implementation Steps ==
=== Add Tracking Code ===
=== Add Tracking Code ===
<br>
==== Tracking Code Components ====
The tracking code includes
* Adobe VHL Library JS
* Create SDK Instance
* Setup Global Parameters
* SDK Initialization
* Content Metadata
* staticstart Event
<br>
The Adobe DCR Tracking Code must be added to each page.
The Adobe DCR Tracking Code must be added to each page.
<br>
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
<script src="script/lib/VideoHeartbeat.min.js"></script>
<script src="script/lib/VideoHeartbeat.min.js"></script>
Line 24: Line 35:
  };
  };
    
    
  //You Can Now Initialize The SDK
  //You Can Now Initialize The SDK While Passing The Global Parameters
  i.ggInitialize(_nolggGlobalParams);
  i.ggInitialize(_nolggGlobalParams);


Line 39: Line 50:
   // Event 'staticstart' Call
   // Event 'staticstart' Call
   i.ggPM("staticstart", nielsenMetadata);
   i.ggPM("staticstart", nielsenMetadata);
</script></syntaxhighlight>
</syntaxhighlight>
 
==== Tracking Code Components ====
The tracking code includes
* Adobe VHL Library JS
* Create SDK Instance
* Setup Global Parameters
* SDK Initialization
* Content Metadata
* staticstart Event
 
'''Static Queue Snippet'''
 
The Adobe VHL Library allows the SDK APIs to be called while the actual SDK and configuration file are still being downloaded. As the queue can capture all API calls before the download completes, there is no wait time. Once the SDK is available, the API calls will transition from directing to the queue to the SDK seamlessly.
<syntaxhighlight lang="javascript">
<script src="script/lib/VideoHeartbeat.min.js"></script>
 
 
'''SDK Initialization'''
 
While creating an SDK instance, initialize the SDK by calling:
 
'''Initialization API Call'''
 
<syntaxhighlight lang="javascript">NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX", "",{nol_sdkDebug: "debug"})</syntaxhighlight>
 
When the initialization call is made, a unique static config file, <code><apid>.js</code>, will be downloaded based on the <code>apid</code> and cached by the client-side browser(s).
 
Once the static config file is downloaded, the SDK will be fully downloaded and initialized. All SDK modules are included in one file:
"nlsSDK600.bundle.min.js".
 
'''Content Metadata'''
 
Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values.
 
Pass dynamic metadata for the keys with the <code><metadataPlaceholder></code> value (e.g. <code>section: ''</code>).
 
'''staticstart Event'''
 
There is only one event call required:
<syntaxhighlight lang="javascript">nSdkInstance.ggPM("staticstart", nielsenMetadata);</syntaxhighlight>
 
The content metadata object is passed as a parameter when calling 'staticstart' event . To know more about configuring metadata refer [[Bundled_SDK_-_Static#Configure_Metadata|Step 3]].


=== Pass App ID in Initialization Call ===
=== Pass App ID in Initialization Call ===
Line 88: Line 57:
'''Example SDK Initialization'''
'''Example SDK Initialization'''


<syntaxhighlight lang="javascript">var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX", "nlsnInstance", {nol_sdkDebug: "debug"});</syntaxhighlight>
<syntaxhighlight lang="javascript">
 
var i = NOLSDK.getInstance('mynewinstance');
The initialization call has three parameters:
var _nolggGlobalParams = {
    apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
    sfcode: "dcr",
    nsdkv: "511",
    apn: "Static-VHL",
    nol_sdkDebug: "DEBUG"
};
i.ggInitialize(_nolggGlobalParams);</syntaxhighlight>
<br>
The initialization call has five parameters:
<br>
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 97: Line 76:
| apid || Unique ID assigned to player/site. || <code>PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX</code>
| apid || Unique ID assigned to player/site. || <code>PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX</code>
|-
|-
| instanceName || Name of SDK instance || Any string value
| sfcode || Nielsen Server Designation || 'dcr'
|-
|-
| nol_sdkDebug: "debug" || Enables Nielsen console logging. Only required for testing || <code>{nol_sdkDebug: "debug"}</code>
| nsdkv || Nielsen SDK version || '511'
|-
| apn || Name of App || Any string value
|-
| nol_sdkDebug: "debug" || Enables Nielsen console logging. Only required for testing || <code>nol_sdkDebug: "debug"</code>
|}
|}


Line 114: Line 97:
| type || asset type || fixed || <code>'static'</code> || Yes
| type || asset type || fixed || <code>'static'</code> || Yes
|-
|-
| assetid || Unique ID for each article || dynamic || custom || Yes
| assetid || Unique ID for each article || dynamic || custom <br>(no [[Special Characters]]) || Yes
|-
|-
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes
| section || section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values || dynamic || custom || Yes
Line 122: Line 105:
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No
| segB || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No
|-
|-
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || fixed || custom || No
| segC || custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) || dynamic || custom || No
|}
|}


Line 145: Line 128:
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
The site must provide a means for the user to opt-out of, or opt back into, Nielsen Measurement. A user can opt-out if they would prefer not to participate in any Nielsen online measurement research. To implement the opt-out option, include the following two items in your privacy policy
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)
* A notice that the player includes proprietary measurement software that allows users to contribute to market research (such as Nielsen TV Ratings)
* A link to the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy
* A link to the Nielsen Digital Measurement Privacy Policy at https://www.nielsen.com/digitalprivacy
On the Nielsen Digital Measurement Privacy Policy page, users can click Choices to read more detailed information about the measurement software, 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.
On the Nielsen Digital Measurement Privacy Policy page, users can click Choices to read more detailed information about the measurement software, learn about their options with regard to Nielsen measurement, and, if they do not want to participate in Nielsen online measurement, click a link to receive an opt-out cookie.


The following paragraph is a template for an opt-out statement, the properties may feature Nielsen proprietary measurement software, which will allow users to contribute to market research, such as Nielsen TV Ratings. To learn more about the information that Nielsen software may collect and your choices with regard to it, please see the Nielsen Digital Measurement Privacy Policy at http://www.nielsen.com/digitalprivacy.
The following paragraph is a template for an opt-out statement, the properties may feature Nielsen proprietary measurement software, which will allow users to contribute to market research, such as Nielsen TV Ratings. To learn more about the information that Nielsen software may collect and your choices with regard to it, please see the Nielsen Digital Measurement Privacy Policy at https://www.nielsen.com/digitalprivacy.


'''Opt Back In'''
'''Opt Back In'''
Line 158: Line 141:
  <code>onPaginate</code> will refire the view ping with the existing/original metadata.
  <code>onPaginate</code> will refire the view ping with the existing/original metadata.


<source lang="javascript">nSdkInstance.ggPM("onPaginate", scrolloffset);</source>
<source lang="javascript">i.ggPM("onPaginate", scrolloffset);</source>
<br>
<br>
{|
{|
Line 181: Line 164:


== Going Live ==
== Going Live ==
Once the DCR Tracking Code is added to Instant Articles, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.
Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.
<br>
# '''App ID''': Ensure that correct <apid> is used during initialization<syntaxhighlight lang="javascript">'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'</syntaxhighlight>
# '''App ID''': Ensure that correct <apid> is used during initialization<syntaxhighlight lang="javascript">'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'</syntaxhighlight>
<br>
# '''Debug Logging''': Disable logging by deleting <code>{nol_sdkDebug: 'DEBUG'}</code> from initialization call.
# '''Debug Logging''': Disable logging by deleting <code>{nol_sdkDebug: 'DEBUG'}</code> from initialization call.
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:<syntaxhighlight lang="javascript">var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "nlsnInstance");</syntaxhighlight>
#* '''Example Production Initialization Call''' - Refer to the production initialization call below:
<br>
<syntaxhighlight lang="javascript">
var i = NOLSDK.getInstance('mynewinstance');
var _nolggGlobalParams = {
    apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
    sfcode: "dcr",
    nsdkv: "511",
    apn: "Static-VHL"
};
i.ggInitialize(_nolggGlobalParams);</syntaxhighlight>
<br>

Latest revision as of 20:58, 23 February 2023

Engineering Portal breadcrumbArrow.png Digital breadcrumbArrow.png DCR & DTVR breadcrumbArrow.png DCR Static VHL

Prerequisites

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.

'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'

Implementation Steps

Add Tracking Code


Tracking Code Components

The tracking code includes

  • Adobe VHL Library JS
  • Create SDK Instance
  • Setup Global Parameters
  • SDK Initialization
  • Content Metadata
  • staticstart Event


The Adobe DCR Tracking Code must be added to each page.

<script src="script/lib/VideoHeartbeat.min.js"></script>

 // A second SDK instance must be created specifically for static, if video measurement is also enabled on the same page.
 var i = NOLSDK.getInstance('mynewinstance');

 //The Required Nielsen Global Parameters Must Be Established
 var _nolggGlobalParams = {
     apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
     sfcode: "dcr",
     nsdkv: "511",
     apn: "Static-VHL",
     nol_sdkDebug: "DEBUG"
 };
  
 //You Can Now Initialize The SDK While Passing The Global Parameters
 i.ggInitialize(_nolggGlobalParams);

  // Create Content Metadata Object
  var nielsenMetadata = {
    type: 'static', 
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**
    section: '', // *DYNAMIC METADATA*: section of site **REQUIRED**
    segA: '', // *DYNAMIC METADATA*: custom segment
    segB: '', // *DYNAMIC METADATA*: custom segment
    segC: ''  // *DYNAMIC METADATA*: custom segment
    }; 
    
  // Event 'staticstart' Call
  i.ggPM("staticstart", nielsenMetadata);

Pass App ID in Initialization Call

Pass the unique App ID in the first parameter of the initialization call, <apid>.

Example SDK Initialization

var i = NOLSDK.getInstance('mynewinstance');
var _nolggGlobalParams = {
     apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
     sfcode: "dcr",
     nsdkv: "511",
     apn: "Static-VHL",
     nol_sdkDebug: "DEBUG"
 };
i.ggInitialize(_nolggGlobalParams);


The initialization call has five parameters:

Parameter Description Values
apid Unique ID assigned to player/site. PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX
sfcode Nielsen Server Designation 'dcr'
nsdkv Nielsen SDK version '511'
apn Name of App Any string value
nol_sdkDebug: "debug" Enables Nielsen console logging. Only required for testing nol_sdkDebug: "debug"

Update <apid> with the AppID provided. Refer to the Going Live section to know about updating the AppID to production after testing is completed.

Configure Metadata

Map the Nielsen keys to variables so that the content metadata is dynamically updated.

The Nielsen reserved keys are:

Key Description Data Type Value Required?
type asset type fixed 'static' Yes
assetid Unique ID for each article dynamic custom
(no Special Characters)
Yes
section section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values dynamic custom Yes
segA custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No
segB custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No
segC custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No

The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B & C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.

Aggregation Limits There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:

Key Aggregation Limit
section maximum of 25 unique values (section <= 25)
segA Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)
segB Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)
segC Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)

Opt-Out

The site must provide a means for the user to opt-out of, or opt back into, Nielsen Measurement. A user can opt-out if they would prefer not to participate in any Nielsen online measurement research. To implement the opt-out option, include the following two items in your privacy policy

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

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

The following paragraph is a template for an opt-out statement, the properties may feature Nielsen proprietary measurement software, which will allow users to contribute to market research, such as Nielsen TV Ratings. To learn more about the information that Nielsen software may collect and your choices with regard to it, please see the Nielsen Digital Measurement Privacy Policy at https://www.nielsen.com/digitalprivacy.

Opt Back In

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

Infinite Scrolling

onPaginate will refire the view ping with the existing/original metadata.
i.ggPM("onPaginate", scrolloffset);


Parameter Description
event onPaginate
scrolloffset The scrolloffset value should be the y-scroll position:

onPaginate

onPageinate is a slightly modified version of staticstart to enable tracking of user’s focus in pages with continuous scrolling. onPaginate event provides the same behavior as staticstart keeping it local to only clients who wish to implement continuous scrolling. (Note: This event onPaginate will not reset the page duration timer.)

  • The maximum number of static View pings allowed per session is ‘1’. This is enforced via the nol_maxPingCount parameter in the tag and the cadence of impression.
  • When an onPaginate event is called at the end of section / a focus shift (within the same page), this filter will reset the current ping count to ‘0’ for the static View ping. This change of value will cause a new View ping when the Browser SDK receives the next staticPosition event (at the section end). This sequence continues through the end of scrolling or till the close of static page session.
StaticPageEvent35.jpg

Going Live

Once the DCR Tracking Code is added to the site, Nielsen will validate the implementation. Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.

  1. App ID: Ensure that correct <apid> is used during initialization
    'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
    


  1. Debug Logging: Disable logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call.
    • Example Production Initialization Call - Refer to the production initialization call below:


var i = NOLSDK.getInstance('mynewinstance');
var _nolggGlobalParams = {
     apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX",
     sfcode: "dcr",
     nsdkv: "511",
     apn: "Static-VHL"
 };
i.ggInitialize(_nolggGlobalParams);