OpenMeasurementTracker
interface OpenMeasurementTracker
The interface definition which wraps and integrates open-measurement.
Integrate Open-Measurement Guide:
- Initialize Open Measurement in onCreate:
public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); OpenMeasurementTracker.initialize(this); } }
Content copied to clipboard - Create the OpenMeasurementTracker with your partner info and the BaseVideoView playing ads.
public class MyActivity extends Activity { private OpenMeasurementTracker omTracker; @Override public void onCreate(Bundle savedInstanceState) { ... omTracker = new OpenMeasurementTracker.Factory( PARTNER_ID, PARTNER_VERSION, videoView ).create(); omTracker.start(); ... } }
Content copied to clipboard - Stop the tracker when the activity is destroyed:
@Override public void onDestroy() { omTracker.stop(); }
Content copied to clipboard
When integrated, the tracker will handle creating the ad session, sending tracking events, handling player state, parsing the VAST for verification scripts, etc.
Types
Link copied to clipboard
An error that may be thrown when an issue occurs starting or stopped an open-measurement tracking session.
Link copied to clipboard
Factory to create an OpenMeasurementTracker
Properties
Functions
Link copied to clipboard
abstract fun addFriendlyObstruction(view: View, purpose: FriendlyObstructionPurpose, reason: String)
Add friendly obstruction which should then be excluded from all ad session viewability calculations.
Link copied to clipboard
Add a listener for OMID events.
Link copied to clipboard
Initialize the OM SDK.
Link copied to clipboard
Removes a listener from the tracking session.