Open Measurement (OM)
OpenMeasurement SDK is an open-source solution for measuring ad impressions in the digital advertising industry. It provides a standardized way for ad verification companies and advertisers to collect, transmit, and receive impression data from digital ads. The SDK helps to ensure accurate measurement of ad impressions and supports viewability, verification, and fraud detection efforts.
Configuration
Attribute | Type | Required | Description |
---|---|---|---|
enabled | boolean | Yes | Enable the plugin (Defaults to false if no value is given.) |
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: {
...
openMeasurement: {
enabled: true,
},
...
},
...
};
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,
},
});
To verify your ads with Open Measurement SDK, please insert the following into your VAST.
VAST4.1+
<AdVerifications>
<Verification vendor="”company.com-omid”">
<JavaScriptResource apiFramework="omid" browserOptional="”true”">
<![CDATA[https://verification.com/omid_verification.js]]>
</JavaScriptResource>
<TrackingEvents>
<Tracking event="verificationNotExecuted">
<![CDATA[https://verification.com/trackingur/[REASON]l]]>
</Tracking>
</TrackingEvents>
<VerificationParameters>
<![CDATA[verification params key value pairs]]>
</VerificationParameters>
</Verification>
</AdVerifications>
For older versions of VAST (2.0, 3.0, 4.0), verification code should be loaded using the <Extensions> node
VAST4.0 and earlier
...
<Extensions>
<Extension type="AdVerifications">
<AdVerifications>
<Verification vendor="”company.com-omid”">
<JavaScriptResource apiFramework="omid" browserOptional="true">
<![CDATA[https://verification.com/omid_verification.js]]>
</JavaScriptResource>
<TrackingEvents>
<Tracking event="verificationNotExecuted">
<![CDATA[https://verification.com/trackingurl]]>
</Tracking>
</TrackingEvents>
<VerificationParameters>
<![CDATA[verification params key value pairs]]>
</VerificationParameters>
</Verification>
</AdVerifications>
</Extension>
</Extensions>
...