Nielsen SDK Documentation

Digital Audio Implementation Guide – Browser SDK

Digital Audio Implementation Guide

API Version 5.1.0


Before starting the integration with Browser SDK, secure the following details from the (point of contact) Nielsen TAM.

  • App ID (apid): Unique ID assigned to the player/site and configured by product.
  • sfcode: Location of collection environment. Use the sfcode as “us“.

If you do not have any of these pre-requisites or if you have any questions, please contact our SDK sales support team.

Step 1: Import Library

In the HTML head section of each page, call the Nielsen library using the script tag, as shown below.

Step 2: Define GlobalParams

Step 3: Initialize SDK

Initialize Browser SDK as soon as the Parent / Main Page is loaded. During the initialization, custom parameters can be appended to the global parameter object. These custom (extended) parameters are optional. Use them only if the player application can handle the data requirement.

The Nielsen Browser SDK supports multiple processing instances. To create an instance, call the getInstance() function

All subsequent calls to getInstance with the same instanceName will return an already created SDK instance with that name. This will allow accessing the same object from different parts of the code.

The “instanceName” parameter is optional and will be set to “default” if missing. To use a single default SDK instance call

In order to initialize the SDK, parameters must be passed when calling the initialization function (ggInitialize). The available parameters are listed in the table below.

Parameters Description Value Required? (Y/N)
apid UniqueID assigned to player/site. Nielsen assigned Yes
apn User-defined string value for describing the player/site. Client specified No
sfcode Location of collection environment. “us” Yes
nol_sdkDebug Enables Debug Mode which allows output to be viewed in console. “console” No

Step 4: Configure and fire API calls

The syntax for firing events is

Event is passed in parameter 1 and the argument is passed in parameter 2.

Configure API calls – loadMetadata

Use loadMetadata to pass ‘content’ metadata. The CMS data must be passed as a JSON string.

Digital Audio measurement is for digital-only audio content. For Digital Audio, provide the parameters shown in the table below. The first loadMetadata call must have type as radio (“type”: “radio”).

Data Needed Description Value
dataSrc ** Source of the data. For Digital Audio, pass dataSrc as “cms”. cms
type Type of content. For Digital Audio, set type as “radio”. radio
assetid Station identifier, should include call letters and band. WXYZ-FM
stationType OTA station flag and / or OTA station type
0: Custom station built per user
1: OTA streaming station with the same ad load
2: OTA station with a different ad load
3: Multicast eRadio or online station
4: On Demand Audio (podcasting)
0, 1, 2, 3, or 4
provider Name of Provider XYZ Provider

Sample Metadata Object

Configure API calls – setPlayheadPosition

Use setPlayheadPosition 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 end API.

Configure API calls – end

Call end only at the end of playback. Call play when resuming the station / starting the new station.

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 user wants to opt in or opt out of Nielsen measurement, a new dynamic page (with content similar to should be displayed.
  • For more details, refer to Opt-Out Implementation and Nielsen Digital Privacy.

Pre-Certification Checklists

  • After the application is ready to be sent for Nielsen Certification, please go through the Pre-Certification Checklist and ensure that it behaves as expected, before submitting to Nielsen.

Testing an Implementation – Browser

Click here for information on Testing the Browser Implementation.