DAR Android SDK: Difference between revisions
From Engineering Client Portal
No edit summary |
|||
Line 60: | Line 60: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Sample JSON string with the DAR string (decoded http string without the c13) | * '''EXAMPLE''': Sample JSON string with the DAR string (decoded http string without the c13) | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
{ | { | ||
"type": "ad", | "type": "ad", | ||
"ocrtag": "http://secure- | "ocrtag": "http://secure-gl.imrworldwide.com/cgi-bin/m?ci=ent30986&am=22&ep=1&at=view&rt=banner&st=image&ca=cmp97144&cr=1186239&pc=3739659&r=2011370876" | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 19:19, 29 August 2017
Prerequisites
To start using the App SDK, the following details are required:
- App ID (appid): Unique ID assigned to the player/site and configured by product.
- sfcode: Unique identifier for the environment that the SDK should point to.
- Nielsen SDK and Sample Player: A part of the downloaded package
If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team. Refer to Digital Measurement Onboarding for more information on how to get a Nielsen App SDK and appid.
Import Library
Refer to Android SDK API Reference - Importing Frameworks for information on importing libraries.
- The latest version of App SDK allows instantiating multiple instances of App SDK object and can be used simultaneously without any issues.
Note: The latest version of App SDK contains only appsdk.jar file and does not feature any native shared libraries like libAppSdk.so.
Initialize SDK
Initialize App SDK as soon as the application is launched. Refer to Android SDK API Reference - Initialization for details on initializing an AppSDK object and the parameters required.
Configure API calls
loadMetadata
DAR tags are used to track commercial delivery for campaign ratings. DAR tags are received during the streaming session from the Content Management System (CMS) identifying that the video contains ad content. This information should be passed as a JSON object via the loadMetadata() method with DAR contents.
DAR Tags
Nielsen DAR tag may come in different forms from ad service via VAST XML or ad service integrated player framework library. The CMS data must be passed as a JSON object.
loadMetadata(JSONObject jsonMetadata);
Refer to Digital Measurement Metadata section for the parameters to be passed in the JSON object.
The DAR tags received from your CMS system should be transformed into a JSON string and passed in via the loadMetadata() method.
Variable Name | Variable Description | Example |
---|---|---|
type | Type identifies the tag content type. For DAR, the data type should be always set to "ad". | ad |
ocrtag | The complete tag/URL is supplied by your Technical Account Manager. This should include the complete URL including the http portion. The ocrtag should be properly URI encoded. | http://secure-uat-cert.imrworldwide.com |
SDK Integration
After getting the string from an ad service, to integrate Nielsen SDK for DAR tag, the app should first identify a Nielsen beacon in the use cases below
- If the input string is CDATA string, get the value of the CDATA as a new input string.
- If the input string (or new input string) starts with http and the hostname ends with “imrworldwide.com”, the input string is a Nielsen beacon (case 1 and case 3).
- If the input string (or new input string) starts with http and the CR field exists
- Get the value of the CR field.
- If the CR value starts with http and the hostname of the CR value ends with “imrworldwide.com”, the CR value is a Nielsen beacon (case 2 and case 4).
- If the Nielsen beacon exists, remove the value of the CR field from the input string and process the updated string for the non-DAR beacon.
- If the Nielsen beacon exists
- URL decode the Nielsen beacon.
- If the c13 field exists in the Nielsen beacon, remove the c13 from the Nielsen beacon.
- Create JSON with the Nielsen beacon
{
"type": "ad",
"ocrtag": "<Nielsen beacon>"
}
- EXAMPLE: Sample JSON string with the DAR string (decoded http string without the c13)
{
"type": "ad",
"ocrtag": "http://secure-gl.imrworldwide.com/cgi-bin/m?ci=ent30986&am=22&ep=1&at=view&rt=banner&st=image&ca=cmp97144&cr=1186239&pc=3739659&r=2011370876"
}
- Send the JSON to the Nielsen SDK using loadMetadata.
Nielsen Measurement Opt-Out Implementation
As a global information and measurement leader, we are committed to protecting the privacy and security of the data we collect, process and use. Our digital measurement products are not used to identify the consumer in any way, but they help us and our clients measure and analyze how consumers engage with media across online, mobile and emerging technologies, and offer insights into consumer behavior.
- When the app user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content string obtained from userOptOutURLString()) should be displayed.
- Use getOptOutStatus() to retrieve the device’s Opt-Out status.
- This Opt-out page should be displayed in a webview (within the app) and not in any external browser.
- Capture the user’s selection in this page and pass it to the SDK through userOptOut() for Nielsen to save the user’s preference.
- For more details, refer to Android SDK API Reference - Android Opt-Out Implementation and Nielsen Digital Privacy.
Note: The SDK will continue measurement even after the user has opted out from Nielsen measurement.
Pre-Certification Checklists
After the application is ready to be sent for Nielsen Certification, please go through the Pre-Certification Checklist and ensure the app behaves as expected, before submitting to Nielsen.