AMP Android SDK: Nielsen DCR integration

Document created by Orlando Sanchez Martinez Employee on Dec 28, 2016Last modified by Herberth Alvarado on Apr 9, 2017
Version 7Show Document
  • View in full screen mode

Prerequisite

The rest of this guide assumes you have successfully integrated AMP's Core (you are able to play back a video).

It also assumes you have started conversations with a Nielsen representative, for them to provide you some custom metadata specific to your Android app, that you will need in Point #5 of this guide (appid, appversion, appname, sfcode and others.).

 

Getting started

For reference, check the NielsenCertApp Android Studio sample project in the release package.
To integrate the plugin into your app, you need to:

 

1) Add the following .jars to your project's /libs folder:
appsdk.jar (provided by Nielsen)
amp-analytics-nielsen-dcr.jar (provided by Akamai)

 

2) In the Activity where playback is handled, import the following Java packages:

import com.akamai.analytics.nielsenanalytics.NielsenDcrAnalyticsTracker;
import com.akamai.config.data.NielsenAdData;
import com.akamai.config.data.NielsenAppData;
import com.akamai.config.data.NielsenContentData;
import com.akamai.config.data.NielsenData;

 

3) Add an object of the NielsenDcrAnalyticsTracker type in your Activity's members:

private NielsenDcrAnalyticsTracker nielsenAnalytics;

 

4) Initialize that object, on the onResourceReady() method from the VideoPlayerContainerCallback:

public void initAnalyticsTracker() {
   nielsenAnalytics = new NielsenDcrAnalyticsTracker(buildNielsenData());
   nielsenAnalytics.setVideoPlayerView(videoPlayerView);
   nielsenAnalytics.enableReporting(true);
   nielsenAnalytics.init(PlayerActivity.this);

   Log.i("AMP+NielsenDCR", "AMP v" + AMPLibraryInfo.VERSION + " Nielsen DCR " + nielsenAnalytics.getAppSdkVersion());
}

 

5) The buildNielsenData() method, returns a com.akamai.config.data.NielsenData object, which is composed by all three of the following objects:

  • NielsenAppData;
  • NielsenContentData;
  • NielsenAdData;

Each one of those three objects receive a java.util.Map of two Strings: the beacon's name and it's value.
To query all the available beacon names on any of those objects, use the getAllMetadata() method.
To query all the mandatory beacon names on any of those objects, use the getMandatoryMetadata() method.
Both methods mentioned previously will return a Set<String>, with the corresponding "official" beacon names.

Check the PlayerActivity.java file from the NielsenCertApp, for an example of how to fill this data.

 

Nielsen's description of every beacon

More information about the NielsenAppData's beacons

 

5.1) Alternatively, you can provide this data as an AMP Config file.

videoPlayerContainer.setConfig(NIELSEN_CONFIG);

When creating the NielsenDcrAnalyticsTracker, use the empty constructor (the NielsenData will be constructed automatically from the .json configuration file).

 

6) If your app integrates ads, it should use the corresponding AMP Plugin for integration with Nielsen. This example assumes Google IMA Ads.
Once the com.akamai.ima.AdsComponent is initialized, it has to send the different events to AMP's Nielsen object:

adsComponent.addEventsListener(nielsenAnalytics);

 

7) To get certified by Nielsen, it is mandatory to show to the customer an opt-out page.
The NielsenDcrAnalyticsTracker provides this custom URL, with the method getOptOutUrl().
Refer to PlayerActivity.java and OptOutActivity.java for an implementation example.

 

8) Reach out to a Nielsen representative to get the "Nielsen DCR Pre-Certification Checklist" PDF.

Once you have validated every item on the checklist is correct, send your app to Nielsen for certification.

Please add amp-sdk-support@akamai.com to that email thread, so we can be in the loop.

Attachments

    Outcomes