DCR Germany Static Browser SDK: Difference between revisions
From Engineering Client Portal
MichelFodjo (talk | contribs) |
MichelFodjo (talk | contribs) |
||
Line 120: | Line 120: | ||
In order to disclose Nielsen measurement privacy statement, please include the following items in your privacy policy: | In order to disclose Nielsen measurement privacy statement, please include the following items in your privacy policy: | ||
* A notice that the player includes third party measurement software that allows users to contribute to market research with anonymous data. | * A notice that the player includes third party measurement software that allows users to contribute to market research with anonymous data. | ||
* A link to the Nielsen Digital Measurement Privacy Policy located at https:// | * A link to the Nielsen Digital Measurement Privacy Policy located at https://nielsen.com/legal/privacy-principles/digital-measurement-privacy-statement/?lang=de . | ||
==Step 6: Testing == | ==Step 6: Testing == |
Revision as of 08:52, 4 August 2022
Overview
The Nielsen SDK is one of multiple framework SDKs that Nielsen provides to enable measuring linear (live) and on-demand TV viewing using TVs, mobile devices, etc. The Browser SDK is the framework for browsers developers to integrate Nielsen Measurement into their Web pages. It supports static content measurement and can track key life cycle events of pages like:
- Site launch events and how long page is viewed
- Time of viewing a sub section / page.
This guide will show you how to enable page measurement (aka Static) on your website(s). The Nielsen Tracking Code must be added to each page with different metadata.
Prerequisites
To get started, an AppID is needed. The AppID is a unique ID assigned to the player/site/app. This will be provided upon starting the integration from Nielsen.
apid: "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" // eg. PDA7D5EE6-B1B8-XXXX-XXXX-2A788BCXXXCA
Step 1: Add Static Queue Snippet
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.
Add the following script tag to the website i.e. within the <head></head> tag :
// Add Static Queue Snippet
!function(e,n){
function t(e){
return"object"==typeof e?JSON.parse(JSON.stringify(e)):e
}
e[n]=e[n]||
{
nlsQ:function(o,r,c){
var s=e.document,
a=s.createElement("script");
a.async=1,
a.src=("http:"===e.location.protocol?"http:":"https:")+"//cdn-gl.nmrodam.com/conf/"+o+".js#name="+r+"&ns="+n;
var i=s.getElementsByTagName("script")[0];
return i.parentNode.insertBefore(a,i),
e[n][r]=e[n][r]||{g:c||{},
ggPM:function(o,c,s,a,i){e[n][r].q=e[n][r].q||[];try{var l=t([o,c,s,a,i]);e[n][r].q.push(l)}catch(e){console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}},
trackEvent:function(o){e[n][r].te=e[n][r].te||[];try{var c=t(o);e[n][r].te.push(c)}catch(e){console&&console.log&&console.log("Error: Cannot register event in Nielsen SDK queue.")}}},
e[n][r]
}
}
}(window,"NOLBUNDLE");
Step 2: Create SDK Instance
While creating an SDK instance, initialize the SDK by calling:
// SDK Initialization
var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX","nlsnInstance", {nol_sdkDebug: "debug"});
The initialization call has the below parameters:
Parameter | Description | Required | Values |
---|---|---|---|
apid | Unique ID assigned to player/site | Yes | 'PXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' |
instanceName | Name of SDK instance | Yes | "any string value" |
nol_sdkDebug | Enables Nielsen console logging. Only required for testing | No | "{nol_sdkDebug: "debug"})" |
When the initialization call is made, a unique static config file, <apid>.js
, will be downloaded based on the apid
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".
Step 3: Create Metadata Object
Key | Description | Values | Required (Obligatory) |
---|---|---|---|
assetid | unique ID assigned to each article/page; only characters 0-9, a-z, A-Z underscore and minus are allowed - no special characters or vowel mutations) | custom (no Special Characters) | ✓ |
section | section of each site (e.g. section value should be first level in page URL: website.com/section) | custom | ✓ |
segA | custom segment for reporting: unique values across custom segments (segA + segB + segC) | custom | ✓ |
segB | custom segment for reporting: unique values across custom segments (segA + segB + segC) | custom | |
segC | custom segment for reporting: unique values across custom segments (segA + segB + segC) | custom | |
subbrand | vcid/sub-brand ID – value is automatically populated through provided App ID. In order to override the sub-brand configured to the App ID, value can be passed here (e.g. multiple sub-brands in App) | provided by Nielsen |
Example Web Page Metadata Object
<script>
window.articlemetadata = {
type: "static",
assetid: "Unique_page_ID",
section: "Unique_section_ID",
segA: "Unique_section_segA",
segB: "Optional_section_segB",
segC: "Optional_section_segC",
subbrand: "subbrand_received_from_Nielsen"
};
</script>
Step 4: Call staticstart Event
Start static measurement :
// Event 'staticstart' Call
nSdkInstance.ggPM("staticstart", window.articlemetadata);
The content metadata object is passed as a parameter.
Step 5: Review Privacy and Opt-Out
The Browser SDK measurement is working without cookies and other personal information. No user can be identified personally, therefore an opt-out functionality is not required. The Nielsen Browser SDK measurement is utilizing a cookieless domain.
In order to disclose Nielsen measurement privacy statement, please include the following items in your privacy policy:
- A notice that the player includes third party measurement software that allows users to contribute to market research with anonymous data.
- A link to the Nielsen Digital Measurement Privacy Policy located at https://nielsen.com/legal/privacy-principles/digital-measurement-privacy-statement/?lang=de .
Step 6: Testing
Monitoring Tools Testing the Browser Implementation
The steps to test the implementation are given below.
Step 6.1
Filter HTTP traffic with the string "nmr" to capture traffic from the SDK. This will capture traffic going to Nielsen servers.
Step 6.2
Verify that the Nielsen SDK is being downloaded correctly and is the correct version.
http://cdn-gl.nmrodam.com/novms/js/2/nlsSDK600.bundle.min.js
Step 6.3
When the page is loaded for the first time, the Browser SDK fires a View ping as soon as content is loaded. Utilizing your HTTP traffic filter tool, you can now validate the metadata that is being sent to the Nielsen collection servers.
Example View Ping Below:
https://secure-eu.nmrodam.com/cgi-bin/gn?prd=dcr&ci=us-500207&ch=us-500207_c77_Main-GTM_P&asn=Main-GTM&sessionId=8l2XGnAW6IC3Cc2MIMh0RYRTqimuU1553108759&prv=1&c6=vc,c77&ca=NA&c13=asid,P00BEB680-1F1A-47BB-922D-1BD2F1BA79A7&c32=...
Step 6.4
The first duration ping is fired after 5 minutes of content is viewed and is indicated by the cr value containing a D. This should fire every 5 minutes but only when the page is in focus.
http://secure-eu.nmrodam.com/cgi-bin/gn?prd=dcr&st=dcr&rt=text&forward=0&sup=0
&ad=0&asn=%2Fsdk2%2Findex2.html&ci=us-500270&c6=vc,c77&c9=devid,&c11=agg,1
&c12=apv,3&c13=asid,PAA3A8EF7-E6D2-4A9E-9787-BDXXXXXXXXXX&c15=apn,Test2
&c16=sdkv,bj.5.1.5&c26=dmap,1&c29=plid,14767465028039340&c30=bldv,1.0.0.15&c32=segA,USA
&c33=segB,CA&c34=segC,RSM&at=timer&cr=D&c27=cln,300&rnd=857576
Step 7: Going Live
Following Nielsen testing, users need to make a couple of updates to the initialization call to ensure that the site is being measured properly.
- Debug Logging: Disable logging by deleting
{nol_sdkDebug: 'debug'}
from initialization call.
Example Production Initialization Call
Refer to the production initialization call below:
var nSdkInstance = NOLBUNDLE.nlsQ("P14273221-CF5C-46BF-A832-994AEFB7XXXX");
Note: before going live you have to inform Nielsen - this is necessary, because Nielsen team has to adjust internal configuration parameter to enable data collection. Without that notification no data will be collected and no data will be reported.
Step 8: Review the Sample Implementation for your Reference
The Sample Implementation for AGF located here.