Nielsen SDK Documentation

Digital Audio Implementation Guide – iOS

Digital Audio Implementation Guide

API Version 5.1.1

Step 1: Prerequisites

To start using 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 Onboarding process for more information on how to get a Nielsen App SDK and App ID.

Step 2: Import Library

Refer to 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.

Step 3: Initialize SDK

Initialize App SDK as soon as the application is launched. Refer to Initialization for details on initializing an AppSDK object and the parameters required.

Step 4: Configure and fire API calls

Configure API calls – play

Use play to pass the channel descriptor information through channelName parameter when the user taps the Play button on the player.

  • channelName is a 32-character field containing the name of the program or feed such as: “WENZ-FM”, “The Dove-Tampa”, “Hot 107.9”, or “Aerosmith Radio”.
  • channelName is an optional parameter for Digital Audio implementations.

Configure API calls – loadMetadata

Use loadMetadata to pass radio station metadata. The CMS data must be passed as a JSON object.

loadMetadata after the first play call must have type as radio (“type”: “radio”).

Configure API calls – playheadPosition (Content)

Use playheadPosition to pass the position of the playhead while the content is being played.

# Key Description Values Required? (Y/N) Example

1.

Live UTC of the live content. Client-defined Yes Seconds since 1970.

If playhead is not available from audio Measurement, allow the app to start a timer (1-5 seconds) and use the timer event to send playhead position to the SDK. Once the actual playhead is available, let the app send the proper playhead position. This allows the SDK to calculate and provide a closer value for duration.

Buffering state

  • Do not supply playhead position while the content is being buffered.
  • If the content is in buffering state continuously for more than 30 seconds, call stop API.

Sample Playhead

Configure API calls – stop

Call stop in case of interruptions during playback like flight mode, Wi-Fi toggle, etc. Call play when resuming the stream / starting the new stream.

API Call sequence

Call loadMetadata with JSON metadata for content as below.

Call playheadPosition every one second until a pause / stop. The sample API sequence can be used for reference when identifying the specific events that need to be called during content playback without ads.

Type Sample code Description
Start of stream [nielsenMeter play: channelName];

[nielsenMeter loadMetadata: contentMetadataObject];
// channelName contains JSON metadata of channel/video name being played
// contentMetadataObject contains the JSON metadata for the content being played
Content [nielsenMeter playheadPosition: position]; // playheadPosition is position of the playhead while the content is being played
End of Stream [nielsenMeter stop]; // playback is completed

Step 5: Interruptions during playback

As part of integrating Nielsen App SDK with the player application, the Audio / Video app developer needs to handle the following possible interruption scenarios.

  • Pause / Play
  • Network Loss (Wi-Fi / Airplane / Cellular)
  • Call Interrupt (SIM or Third party Skype/Hangout call)
  • Alarm Interrupt
  • Content Buffering
  • Channel / Station Change Scenario
  • Unplugging of headphone

In case of encountering one of the above interruptions, the player application needs to

  • Call stop immediately (except when content is buffering) and withhold sending playhead position.
  • Start sending pings – loadMetadata and playheadPosition for the new viewing session, once the playback resumes.

Click here for more details.

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 OptOutURL) should be displayed.
    • Use optOutStatus 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 Opt-Out Implementation and Nielsen Digital Privacy.

The SDK will continue measurement even after the user has opted out from Nielsen measurement.

Click here for Opt-Out implementation guidelines to be followed for TVOS-based 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.

Testing an Implementation – App

Click here for information on Testing the App Implementation.