Skip to main content

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

AttributeTypeRequiredDescription
enabledbooleanYesEnable the plugin (Defaults to false if no value is given.)
appIdstringYesUnique ID assigned to the player/site and configured by product provided by Nielsen
initializationObject<[key: string]: string>NoThe initialization parameters of the Nielsen SDK.
metadataObject<[key: string]: string>NoThe metadata to be sent to the Nielsen.
import React, { useRef, useEffect, useState } from "react";
import { SafeAreaView, StyleSheet, View } from "react-native";
import { LuraPlayer, type UnifiedPlayer, type Configuration } from "@akta-tech/lura-player-react-native";
import { LuraPlayerControls } from "@akta-tech/lura-player-react-native-ui";

export default function App() {
const playerRef = useRef<UnifiedPlayer>(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}>
<LuraPlayerControls></LuraPlayerControls>
</LuraPlayer>
</View>
);
}

const styles = StyleSheet.create({
player: {
backgroundColor: "#000",
width: "100%",
maxWidth: 640,
aspectRatio: 16 / 9,
},
});