Nielsen DCR & DTVR
Nielsen Digital Content Ratings (DCR) and Digital TV Ratings (DTVR) are both measurement systems developed by Nielsen to provide insights into audience behavior and engagement across digital media.
Configuration
| Attribute | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) |
| appId | string | Yes | Unique ID assigned to the player/site and configured by product provided by Nielsen |
| initialization | Object<[key: string]: string> | No | The initialization parameters of the Nielsen SDK. |
| metadata | Object<[key: string]: string> | No | The metadata to be sent to the Nielsen. |
import React, { useRef, useEffect, useState } from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";
import { LuraPlayer, type UnifiedPlaylist, type Configuration } from "@akta-tech/lura-player-react-native";
import { LuraPlayerControls } from "@akta-tech/lura-player-react-native-ui";
import "@akta-tech/lura-player-react-native-nielsen-plugin";
export default function App() {
const playerRef = useRef<UnifiedPlaylist>(null);
const config: Configuration = {
...
plugins: {
...
nielsen: {
enabled: true,
appId: "APP_ID_PROVIDED_BY_NIELSEN",
initialization: {
...
key: "value",
...
},
metadata: {
...
key: "value",
...
}
},
...
},
...
};
useEffect(() => {
playerRef.current?.setConfig(config)
}, [playerRef]);
return (
<View>
<SafeAreaView />
<LuraPlayer ref={playerRef} style={styles.player} Controls={LuraPlayerControls} />
</View>
);
}
const styles = StyleSheet.create({
player: {
backgroundColor: "#000",
width: "100%",
maxWidth: 640,
aspectRatio: 16 / 9,
},
});