1.1.2 • Published 1 month ago

@theoplayer/nielsen-connector-web v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

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:

KeyValue
containerIdHTML DOM element id of the player container.
nol_sdkDebugEnables Debug Mode which allows output to be viewed in console.
optoutWhether 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);
1.1.2

1 month ago

1.1.1

1 month ago

1.1.0

2 months ago

1.0.0

1 year ago