DCR Germany Static Google AMP Cloud API: Difference between revisions

From Engineering Client Portal

(Created page with "{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|AGF Implementation Documentation}} {{CurrentBreadcrumb}} Category:Digital == Overview == This guide will show you how...")
 
No edit summary
Line 85: Line 85:
</syntaxhighlight>
</syntaxhighlight>


=== Step 3.3: Review sample Nielsen DCR Tags for Content and "Werbetraeger" ===
=== Step 3.3: Review sample Nielsen DCR Tag for Content" ===


==== Step 3.3.1: For Content ====
<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
<amp-analytics type="nielsen">
<amp-analytics type="nielsen">
Line 110: Line 109:
</syntaxhighlight>
</syntaxhighlight>


==== Step 3.3.2: For "Werbetraeger" ====
<syntaxhighlight lang="html">
<amp-analytics type="nielsen">
    <script type="application/json">
        {
            "vars": {
                "apid": "0A3CA5B6-4D32-42E7-9B9D-97A807C43469",
                "assetid": "CloudAPIRefImpStaticDE_gAMPstatic",
                "section": "section_WPI1",
                "segA": "AGOF_Code_Nlsn",
                "segB": "WPI_1666787027",
                "segC": "Program_Name_Nlsn",
                "subbrand": "c01"
            },
            "requests": {
                "session": "https://eu-uaid-linkage.nmrodam.com/cgi-bin/gn?prd=session&c13=asid,P${apid}&sessionId=${pageViewId64}_${pageViewId}&pingtype=4&enc=false&c61=createtm,${timestamp}&rnd=${random}",
                "cloudapi": "https://agfcapi.nmrodam.com/nmapi/v2/${apid}/${pageViewId64}_${pageViewId}/a?b=%7B%22devInfo%22%3A%7B%22devId%22%3A%22${pageViewId64}_${pageViewId}%22%2C%22apn%22%3A%22${apn}%22%2C%22apv%22%3A%22${apv}%22%2C%22apid%22%3A%22${apid}%22%7D%2C%22metadata%22%3A%7B%22static%22%3A%7B%22type%22%3A%22static%22%2C%22section%22%3A%22${section}%22%2C%22assetid%22%3A%22${assetid}%22%2C%22segA%22%3A%22${segA}%22%2C%22segB%22%3A%22${segB}%22%2C%22segC%22%3A%22${segC}%22%2C%22subbrand%22%3A%22${subbrand}%22%2C%22adModel%22%3A%220%22%2C%22dataSrc%22%3A%22cms%22%7D%2C%22content%22%3A%7B%7D%2C%22ad%22%3A%7B%7D%7D%2C%22event%22%3A%22playhead%22%2C%22position%22%3A%22${timestamp}%22%2C%22data%22%3A%7B%22hidden%22%3A%22${backgroundState}%22%2C%22blur%22%3A%22${backgroundState}%22%2C%22position%22%3A%22${timestamp}%22%7D%2C%22type%22%3A%22static%22%2C%22utc%22%3A%22${timestamp}%22%2C%22index%22%3A%22${requestCount}%22%2C%22pageURL%22%3A%22${ampdocUrl}%22%7D"
            }
        }
    </script>
</amp-analytics>
</syntaxhighlight>


== Step 4: Review Privacy and Opt-Out ==
== Step 4: Review Privacy and Opt-Out ==

Revision as of 12:54, 21 November 2022

Engineering Portal / Digital / AGF Implementation Documentation / DCR Germany Static Google AMP Cloud API

Overview

This guide will show you how to enable Digital Content Ratings (DCR) Static measurement on Google AMP.

Please note that the Static Google AMP Cloud API product is not yet fully released in Germany!

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.

Note: The value for the 'apid' you pass for AMP measurement should not include the 'P' prefix that is otherwise present on other SDK-related implementations

  apid: "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" // eg. PDA7D5EE6-B1B8-XXXX-XXXX-2A788BCXXXCA

Step 1: Import the Google AMP Analytics Javascript Library

If you have not already, you will need to import the AMP JS library in the <head> of your webpage in order to create an AMP page:

 <!-- Load AMP -->
<script async src="https://cdn.ampproject.org/v0.js"></script>


Next, Load amp-analytics by adding the following line to the <head> of the webpage:

<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

Note: AMP pages require all traffic to be using HTTPS, including the webpage itself


Step 2: Specify the Analytics Provider

DCR measurement can now be added to your AMP pages through the amp-Analytics custom-element:

<amp-analytics type="nielsen">
    <!-- Add Nielsen DCR Tags here -->
</amp-analytics>

For more information on the Analytics type, you can refer to the Analytics vendors section of Google's AMP Developer Documentation.

Step 3: Configure the Metadata

You will need to match the metadata fields on your AMP page with those of your non-AMP page.


Step 3.1: Add the Metadata to Nielsen DCR Tags

Note: The value for the 'apid' you pass for AMP measurement should not include the 'P' prefix that is otherwise present on other SDK-related implementations

The full description of the other key/value pairs for Metadata can be found here: AGF Metadata Convention for Static Measurement

<amp-analytics type="nielsen">
    <script type="application/json">
        {
            "vars": {
                "apid": "Your AppID",
                "assetid": "Your unique assetid",
                "section": "Your section",
                "segA": "Your AGOF Code",
                "segB": "CPI or WPI_Timestamp",
                "segC": "Your program name",
                "subbrand": "Your subbrand"
            },
            "requests": {
               
            }
        }
    </script>
</amp-analytics>

Step 3.2: Add Nielsen request configuration parameters to Nielsen DCR Tags

Please do not modify this Tag!

<amp-analytics type="nielsen">
    <script type="application/json">
        {
            "vars": {
            },
            "requests": {
                "session": "https://eu-uaid-linkage.nmrodam.com/cgi-bin/gn?prd=session&c13=asid,P${apid}&sessionId=${pageViewId64}_${pageViewId}&pingtype=4&enc=false&c61=createtm,${timestamp}&rnd=${random}",
                "cloudapi": "https://agfcapi.nmrodam.com/nmapi/v2/${apid}/${pageViewId64}_${pageViewId}/a?b=%7B%22devInfo%22%3A%7B%22devId%22%3A%22${pageViewId64}_${pageViewId}%22%2C%22apn%22%3A%22${apn}%22%2C%22apv%22%3A%22${apv}%22%2C%22apid%22%3A%22${apid}%22%7D%2C%22metadata%22%3A%7B%22static%22%3A%7B%22type%22%3A%22static%22%2C%22section%22%3A%22${section}%22%2C%22assetid%22%3A%22${assetid}%22%2C%22segA%22%3A%22${segA}%22%2C%22segB%22%3A%22${segB}%22%2C%22segC%22%3A%22${segC}%22%2C%22subbrand%22%3A%22${subbrand}%22%2C%22adModel%22%3A%220%22%2C%22dataSrc%22%3A%22cms%22%7D%2C%22content%22%3A%7B%7D%2C%22ad%22%3A%7B%7D%7D%2C%22event%22%3A%22playhead%22%2C%22position%22%3A%22${timestamp}%22%2C%22data%22%3A%7B%22hidden%22%3A%22${backgroundState}%22%2C%22blur%22%3A%22${backgroundState}%22%2C%22position%22%3A%22${timestamp}%22%7D%2C%22type%22%3A%22static%22%2C%22utc%22%3A%22${timestamp}%22%2C%22index%22%3A%22${requestCount}%22%2C%22pageURL%22%3A%22${ampdocUrl}%22%7D"
            }
        }
    </script>
</amp-analytics>

Step 3.3: Review sample Nielsen DCR Tag for Content"

<amp-analytics type="nielsen">
    <script type="application/json">
        {
            "vars": {
                "apid": "0A3CA5B6-4D32-42E7-9B9D-97A807C43469",
                "assetid": "CloudAPIRefImpStaticDE_gAMPstatic",
                "section": "home_page",
                "segA": "AGOF_Code_Nlsn",
                "segB": "CPI",
                "segC": "Program_Name_Nlsn",
                "subbrand": "c01"
            },
            "requests": {
                "session": "https://eu-uaid-linkage.nmrodam.com/cgi-bin/gn?prd=session&c13=asid,P${apid}&sessionId=${pageViewId64}_${pageViewId}&pingtype=4&enc=false&c61=createtm,${timestamp}&rnd=${random}",
                "cloudapi": "https://agfcapi.nmrodam.com/nmapi/v2/${apid}/${pageViewId64}_${pageViewId}/a?b=%7B%22devInfo%22%3A%7B%22devId%22%3A%22${pageViewId64}_${pageViewId}%22%2C%22apn%22%3A%22${apn}%22%2C%22apv%22%3A%22${apv}%22%2C%22apid%22%3A%22${apid}%22%7D%2C%22metadata%22%3A%7B%22static%22%3A%7B%22type%22%3A%22static%22%2C%22section%22%3A%22${section}%22%2C%22assetid%22%3A%22${assetid}%22%2C%22segA%22%3A%22${segA}%22%2C%22segB%22%3A%22${segB}%22%2C%22segC%22%3A%22${segC}%22%2C%22subbrand%22%3A%22${subbrand}%22%2C%22adModel%22%3A%220%22%2C%22dataSrc%22%3A%22cms%22%7D%2C%22content%22%3A%7B%7D%2C%22ad%22%3A%7B%7D%7D%2C%22event%22%3A%22playhead%22%2C%22position%22%3A%22${timestamp}%22%2C%22data%22%3A%7B%22hidden%22%3A%22${backgroundState}%22%2C%22blur%22%3A%22${backgroundState}%22%2C%22position%22%3A%22${timestamp}%22%7D%2C%22type%22%3A%22static%22%2C%22utc%22%3A%22${timestamp}%22%2C%22index%22%3A%22${requestCount}%22%2C%22pageURL%22%3A%22${ampdocUrl}%22%7D"
            }
        }
    </script>
</amp-analytics>


Step 4: Review Privacy and Opt-Out

The Google AMP 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 static measurement is utilizing a cookieless domain.

In order to disclose Nielsen measurement privacy statement, please include the following items in your privacy policy:

Step 5: Testing and going Live

Please provide your test builds to Nielsen for Certification, you can then go live after the certification process.


Step 6: Review the Sample Implementation for your Reference

The Sample Google AMP Implementation for AGF is located here.