DCR Czech Static Browser SDK: Difference between revisions
From Engineering Client Portal
(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}} Category:Digital This guide will show you how to enable page measurement (aka S...") |
MichelFodjo (talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International}} {{CurrentBreadcrumb}} | {{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}} {{CurrentBreadcrumb}} | ||
[[Category:Digital]] | [[Category:Digital]] | ||
Line 16: | Line 16: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
!function( | !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.imrworldwide.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"); | }(window,"NOLBUNDLE"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 105: | Line 115: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
// Event 'staticend' Call | // Event 'staticend' Call | ||
nSdkInstance.ggPM(" | nSdkInstance.ggPM("staticend", nielsenMetadata); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The content metadata object is passed as a | The content metadata object is passed as a parameter. <br /> | ||
Recommendation : Do not place this call inside onBeforeUnload method, because SDK need some time and resources to deliver data to cloud. | Recommendation : Do not place this call inside onBeforeUnload method, because SDK need some time and resources to deliver data to cloud. | ||
Line 120: | Line 130: | ||
The following paragraph is a template for an opt-out statement (in Czech). | The following paragraph is a template for an opt-out statement (in Czech). | ||
<blockquote> | <blockquote> | ||
Tato aplikace obsahuje proprietární měřicí software společnosti Nielsen, který uživatelům umožní přispívat k průzkumu trhu. Chcete-li se dozvědět více o informacích, které může software Nielsen shromažďovat a o Vaší možnosti měření deaktivovat, přečtěte si zásady ochrany osobních údajů Nielsen Digital Measurement na <a href= | Tato aplikace obsahuje proprietární měřicí software společnosti Nielsen, který uživatelům umožní přispívat k průzkumu trhu. Chcete-li se dozvědět více o informacích, které může software Nielsen shromažďovat a o Vaší možnosti měření deaktivovat, přečtěte si zásady ochrany osobních údajů Nielsen Digital Measurement na <a href=https://www.nielsen.com/cz/cs/legal/privacy-statement/digital-measurement/>Nielsen Digital Measurement Privacy Policy</a> | ||
</blockquote> | </blockquote> | ||
Latest revision as of 09:35, 25 September 2023
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 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. If not, please contact Nielsen local staff - see Czech Contacts.
apid: "PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
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.
!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.imrworldwide.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
// Content Metadata
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
};
Metadata can be passed through key-values using the Nielsen reserved keys.
See Czech Metadata.
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) |
So for example, if your site has 30 sections (e.g. News, Sports, Videos, Music, etc.), we would only measure for the first 25 sections. The same applies to the custom breakout parameters segA/B/C.
Step 4: Call staticstart Event
Start static measurement :
// Event 'staticstart' Call
nSdkInstance.ggPM("staticstart", nielsenMetadata);
The content metadata object is passed as a parameter.
Step 5: Call staticend Event
Stop static measurement = to end the current static session and track a new static content:
// Event 'staticend' Call
nSdkInstance.ggPM("staticend", nielsenMetadata);
The content metadata object is passed as a parameter.
Recommendation : Do not place this call inside onBeforeUnload method, because SDK need some time and resources to deliver data to cloud.
Step 6 : Nielsen 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
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. 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.
The following paragraph is a template for an opt-out statement (in Czech).
Tato aplikace obsahuje proprietární měřicí software společnosti Nielsen, který uživatelům umožní přispívat k průzkumu trhu. Chcete-li se dozvědět více o informacích, které může software Nielsen shromažďovat a o Vaší možnosti měření deaktivovat, přečtěte si zásady ochrany osobních údajů Nielsen Digital Measurement na <a href=https://www.nielsen.com/cz/cs/legal/privacy-statement/digital-measurement/>Nielsen Digital Measurement Privacy Policy</a>
Opt-out status
Optional : to retrieve Opt-Out status call getOptOutStatus() , result is boolean value true (OptOuted = not measuring) or false (not OptOuted = measuring).
nSdkInstance.getOptOutStatus();
Step 7 : Test your player by your self
see how to test player at https://www.youtube.com/watch?v=t9eUsf9yh8w&feature=youtu.be
Test SKD API calls
to verify SDK API calls use Chrome and install add-on called "Nielsen SDK Inspector" (https://chrome.google.com/webstore/search/%20Nielsen%20SDK%20Inspector)
Test outgoing pings
to verify outgoing pings use Charles Proxy or any other proxy sw capable to sniff your network traffic. Filter URLs to "imrworld". Example of such ping :
http://secure-eu-cert.imrworldwide.com/cgi-bin/gn?prd=dcr
Step 8 : Provide your app for certification
Once ready please send your application to Nielsen local staff for verification - see Czech Contacts.
Step 9 : Going Live
After the integration has been certified (but not prior that), users will need to disable debug logging by deleting {nol_sdkDebug: 'DEBUG'} from initialization call - see Step 2.
Demos
see live demos with sample implementation available at at http://sdkdemo.admosphere.cz/