Comscore Direct
Comscore Direct is a tool that provides real-time reporting and analysis of online advertising campaigns. It allows advertisers and agencies to monitor the performance of their digital campaigns across multiple platforms, including desktop and mobile devices. The tool provides insights into key metrics such as impressions, clicks, viewability, and engagement rates, which can help advertisers optimize their campaigns and make data-driven decisions.
Configuration
Attribute | Type | Required | Description |
---|---|---|---|
enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) |
publisherId | string | Yes | Provide your Publisher ID value. The Publisher ID is often also referred to as the Client ID or c2 value. |
publisherSecret | string | No | Provide a string with your Publisher Secret value. |
userHasConsent | boolean | No | If you are using a Consent Management Platform (CMP) which implements iAB Transparency and Consent Framework (TCF) version 2.0 then Comscore Publisher Tag integrates with the CMP to automatically collect user consent. No additional steps are necessary to enable this integration, however if you are not using a Consent Management Platform, you can manually ask user for consent and give here. |
appName | string | No | Title of the page that your video is playing. (Defaults to HTML title tag.) |
autoUpdateMode | "FOREGROUND_ONLY" | "FOREGROUND_AND_BACKGROUND" | "DISABLED" | No | This setting controls if the library will update application usage times at a regular interval. (Defaults to FOREGROUND_ONLY) |
autoUpdateInterval | number | No | The interval in seconds at which the library automatically updates usage times if the auto-update is enabled. (Defaults to 60, which is also the minimum value.) |
metadata | Object<[key: string]: string> | No | Metadata to be sent to comscore. |
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: {
...
comscore: {
enabled: true,
publisherId: "PUBLISHER_ID_PROVIDED_BY_COMSCORE",
publisherSecret: "PUBLISHER_SECRET_PROVIDED_BY_COMSCORE",
userHasConsent: true,
appName: "Lura Player Included Application",
autoUpdateMode: "FOREGROUND_ONLY",
autoUpdateInterval: 60,
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,
},
});