DCR Italy Static Facebook Instant Articles Browser SDK: Difference between revisions

From Engineering Client Portal

(first draft for DCR Italy Facebook Instant Articles Integration Guide)
 
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|DCR & DTVR}}  {{CurrentBreadcrumb}}
{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|International DCR}}  {{CurrentBreadcrumb}}
[[Category:Digital]]
[[Category:Digital]]


Line 13: Line 13:
</figure></syntaxhighlight>
</figure></syntaxhighlight>


For more information on the Analytics element, you can refer to the [https://developers.facebook.com/docs/instant-articles/analytics/overview| Insights and Analytics in Instant Articles] section of Facebook’s Instant Article Developer Documentation.
For more information on the Analytics element, you can refer to the [https://developers.facebook.com/docs/instant-articles/analytics/overview Insights and Analytics in Instant Articles] section of Facebook’s Instant Article Developer Documentation.
 


The Nielsen DCR Tracking code below will need to be added within the <code><iframe></code> of the Analytics element on each article:
The Nielsen DCR Tracking code below will need to be added within the <code><iframe></code> of the Analytics element on each article:
<syntaxhighlight lang="html">// load Nielsen JS Library
<syntaxhighlight lang="html">
<script type="text/javascript">
<script>
function loadNielsen()  
  // Static Queue Snippet
{
!function(t,n){t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i){return s=t.document,r=s.createElement("script"),r.async=1,r.src=("http:"===t.location.protocol?"http:":"https:")+"//cdn-gl.imrworldwide.com/conf/"+e+".js#name="+o+"&ns="+n,i=s.getElementsByTagName("script")[0],i.parentNode.insertBefore(r,i),t[n][o]=t[n][o]||{g:c||{},ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]}}}(window,"NOLBUNDLE");
    // create initialization object
 
    var _nolggGlobalParams =  
  // SDK Initialization
    {
  var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX","nlsnInstance", {nsdkvOverride: "501", nol_sdkDebug: "debug"});
      sfcode: 'XXX-cert', // location of collections environment. Value will be provided for testing
 
      apid: 'PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',  // assigned App ID will be provided for testing
  // Content Metadata
      apn: 'PublisherName Instant Articles' // name to identify integration. Can be custom value
  var nielsenMetadata = {
    };
     type: 'static',  
 
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**
    // create SDK instance
    section: 'EntityName_IA', // section of site **REQUIRED**
    var gg1 = NOLCMB.getInstance(_nolggGlobalParams.apid);
    segC: 'Instant Articles'  
 
     };  
    // initialize SDK with initialization object
    gg1.ggInitialize(_nolggGlobalParams);
    // create object with metadata for Instant Article
    var staticmeta =  
     {
      type: 'static',
      assetid: '', // *UPDATE*: unique ID for each article
      section: '', // *UPDATE*: section or category for article
      segA: '', // *UPDATE*: custom segment
      segB: '', // *UPDATE*: custom segment
      segC: 'Instant Articles'  
     };
      
      
    // pass metadata for Instant Article when it is opened 
  // Event 'staticstart' Call
    gg1.ggPM("staticstart",staticmeta);
  nSdkInstance.ggPM("staticstart", nielsenMetadata);
}
</script></syntaxhighlight>
</script>
<script type="text/javascript" src="https://seccdn-gl.imrworldwide.com/novms/js/2/ggcmb501.js" onload="loadNielsen()"></script></syntaxhighlight>


=== Configure Metadata ===
=== Configure Metadata ===
Line 63: Line 49:
| apid || unique ID assigned by Nielsen || <code>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</code> || ✓
| apid || unique ID assigned by Nielsen || <code>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</code> || ✓
|-
|-
| apv || current version of the Nielsen implementation || <code>1.0</code> || ✓
| section || section of the site to be measured || <code>EntityName_IA</code> || ✓
|-
| section || section of the site to be measured || <code>Entertainment</code> || ✓
|-
| segA || custom segment to be used to break out reporting || <code>Music</code> ||
|-
| segB || custom segment to be used to break out reporting || <code>News</code> ||
|-
|-
| segC || Reserved custom segment for Instant Articles || <code>'Instant Articles'</code> || ✓
| segC || reserved custom segment for Instant Articles || <code>'Instant Articles'</code> || ✓
|}
|}
The values passed through the Nielsen keys will determine the breakouts you will see in reporting. If you decide not to use custom segments A and B, then you do not need to pass a value in these keys.


====Metadata for Reporting====
====Metadata for Reporting====
Line 87: Line 64:
| Sub-brand || apid || sub-brand is determined is determined by assigned App ID passed during initialization
| Sub-brand || apid || sub-brand is determined is determined by assigned App ID passed during initialization
|-
|-
| Section || section || section or category for the AMP page
| Section || section || <code>EntityName_IA</code> </br> EntityName = brand name or sub-brand name
|-
| Custom Segment A || segA || available segment for custom reporting. Custom segments will roll into the sub-brand
|-
| Custom Segment B || segB || available segment for custom reporting. Custom segments will roll into the sub-brand
|-
|-
| Custom Segment C || segC || Custom segment C is reserved for reporting ‘Instant Articles’. The Instant Articles custom segment will be available under sub-brand and will include the total metrics for all your Instant Articles
| Custom Segment C || segC || Custom segment C is reserved for reporting ‘Instant Articles’. The Instant Articles custom segment will be available under sub-brand and will include the total metrics for all your Instant Articles
|}
|}
If you would like your Instant Articles to report into the same reporting structure as your website, we recommend passing the same dynamic metadata in Section, Custom Segment A, and Custom Segment B as you are on your website. This way your Instant Articles numbers contribute to those aggregations.


==== Aggregation Limits ====
==== Aggregation Limits ====
Line 106: Line 76:
|-
|-
| section || maximum of 25 unique values (section <= 25)
| section || maximum of 25 unique values (section <= 25)
|-
| segA || total sum of segA, segB, and segC must be a maximum of 24 unique values (segA + segB + segC <= 24)
|-
| segB || total sum of segA, segB, and segC must be a maximum of 24 unique values (segA + segB + segC <= 24)
|}
|}


=== Going Live ===
== Privacy Policy ==
Once you have added the DCR Tracking Code to your Instant Articles, Nielsen will validate your implementation. Following Nielsen testing, you will need to update the test values included in the tracking code:
Nielsen uses cookies for browser measurement. In order to comply with our privacy restrictions,
# <code>apid: ‘PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX’</code>
we ask that you put a link to our Digital Privacy Policy on your Instant Articles pages. You can find our privacy policy here: https://global.nielsen.com/legal/privacy-principles/digital-measurement-privacy-statement/?lang=it
# <code>sfcode: ‘XXX’</code>
 
We will confirm the production values to use after testing is completed.
== Going Live ==
Once you have added the DCR Tracking Code to your Instant Articles, Nielsen will validate your implementation after which you must disable Debug logging by deleting {nol_sdkDebug: 'DEBUG'} from the initialization call.
 
Example:
<syntaxhighlight lang="javascript">
var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX","nlsnInstance", {nsdkvOverride: "501"});
</syntaxhighlight>

Latest revision as of 13:16, 13 July 2022

Engineering Portal breadcrumbArrow.png Digital breadcrumbArrow.png International DCR breadcrumbArrow.png DCR Italy Static Facebook Instant Articles Browser SDK

This guide will show you how to enable Digital Content Ratings (DCR) measurement on your Facebook Instant Articles.

Implementation Steps

Add Tracking Code

DCR measurement can be added to your Instant Articles through the Analytics element:

<figure class="op-tracker">
    <iframe>
        <!-- Add Nielsen DCR Tracking Code here -->
    </iframe>
</figure>

For more information on the Analytics element, you can refer to the Insights and Analytics in Instant Articles section of Facebook’s Instant Article Developer Documentation.


The Nielsen DCR Tracking code below will need to be added within the <iframe> of the Analytics element on each article:

<script>
  // Static Queue Snippet
!function(t,n){t[n]=t[n]||{nlsQ:function(e,o,c,r,s,i){return s=t.document,r=s.createElement("script"),r.async=1,r.src=("http:"===t.location.protocol?"http:":"https:")+"//cdn-gl.imrworldwide.com/conf/"+e+".js#name="+o+"&ns="+n,i=s.getElementsByTagName("script")[0],i.parentNode.insertBefore(r,i),t[n][o]=t[n][o]||{g:c||{},ggPM:function(e,c,r,s,i){(t[n][o].q=t[n][o].q||[]).push([e,c,r,s,i])}},t[n][o]}}}(window,"NOLBUNDLE");

  // SDK Initialization
  var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX","nlsnInstance", {nsdkvOverride: "501", nol_sdkDebug: "debug"});
  
  // Content Metadata 
  var nielsenMetadata = {
    type: 'static', 
    assetid: '', // *DYNAMIC METADATA*: unique ID for each article **REQUIRED**
    section: 'EntityName_IA', // section of site **REQUIRED**
    segC: 'Instant Articles' 
    }; 
    
  // Event 'staticstart' Call
  nSdkInstance.ggPM("staticstart", nielsenMetadata);
</script>

Configure Metadata

Metadata can be passed through key-values using the Nielsen reserved keys. The tracking code includes the Nielsen reserved keys and placeholder values, <metadataPlaceholder>, for dynamic metadata. You will need to update these values.


Metadata Keys

The Nielsen reserved keys are:

Key Description Example Value Required
apid unique ID assigned by Nielsen XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
section section of the site to be measured EntityName_IA
segC reserved custom segment for Instant Articles 'Instant Articles'

Metadata for Reporting

You can reference the table to determine how the metadata you pass is used to define your reporting structure:

Reporting Level Key Description
Brand apid brand is determined by assigned App ID passed during initialization
Sub-brand apid sub-brand is determined is determined by assigned App ID passed during initialization
Section section EntityName_IA
EntityName = brand name or sub-brand name
Custom Segment C segC Custom segment C is reserved for reporting ‘Instant Articles’. The Instant Articles custom segment will be available under sub-brand and will include the total metrics for all your Instant Articles

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)

Privacy Policy

Nielsen uses cookies for browser measurement. In order to comply with our privacy restrictions, we ask that you put a link to our Digital Privacy Policy on your Instant Articles pages. You can find our privacy policy here: https://global.nielsen.com/legal/privacy-principles/digital-measurement-privacy-statement/?lang=it

Going Live

Once you have added the DCR Tracking Code to your Instant Articles, Nielsen will validate your implementation after which you must disable Debug logging by deleting {nol_sdkDebug: 'DEBUG'} from the initialization call.

Example:

 var nSdkInstance = NOLBUNDLE.nlsQ("PXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX","nlsnInstance", {nsdkvOverride: "501"});