@theoplayer/nielsen-connector-web
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Nielsen Web Connector

A connector implementing Nielsen with THEOplayer.

Installation

npm install @theoplayer/nielsen-connector-web

Usage

Configuring the connector

Create the connector by providing the THEOplayer instance, the Nielsen App ID, the channelName for the asset and optionally some Nielsen configuration.

import {NielsenConnector} from "../../dist/THEOplayerNielsenConnector";

const appId = '<your app ID>';
const channelName = '<your channel name>';
// Optional
const options: NielsenOptions = {
    containerId: 'THEOplayer', 
    optout: false
}
const nielsenConnector = new NielsenConnector(player, appId, channelName, options);

The NielsenOptions can have the following fields:

Key Value
containerId HTML DOM element id of the player container.
nol_sdkDebug Enables Debug Mode which allows output to be viewed in console.
optout Whether to opt-out of Nielsen Measurement.

Passing metadata dynamically

The connector allows updating the current asset's metadata at any time:

const metadata = {
    ['channelName']: 'newChannelName',
    ['customTag1']: 'customValue1',
    ['customTag2']: 'customValue2'    
}
nielsenConnector.updateMetadata(metadata);

Readme

Keywords

none

Package Sidebar

Install

npm i @theoplayer/nielsen-connector-web

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

25.3 kB

Total Files

7

Last publish

Collaborators

  • theotechnologies-admin