SSAI Open Measurement with the Native SDK for Android

In this topic, you will learn how to take advantage of the IAB Open Measurement SDK with the SSAI plugin for the Brightcove Native SDK for Android.

Overview

Brightcove's server-side ad insertion (SSAI) plugin for the Native SDK for Android includes the Open Measurement (OM) SDK for Android. This integration allows third-party access to viewability and creative performance measurement data using a standardized API. When integrated, the tracker does the following:

  • Creates the ad session
  • Sends tracking events
  • Handles player state
  • Parses the VAST for verification scripts

Requirements

Open Measurement for SSAI requires the following:

  • Active membership with the IAB Tech Lab for organization namespace registration
  • Brightcove Native SDK for Android v8.1.0 or newer
  • Ads must be configured to traffic either:
    • For VAST spec 4.1, include <AdVerifications> in your VAST file
    • For newer VAST spec versions (4.1+), use <Extension type="AdVerifications">

Android implementation

The Brightcove Native SDK for Android supports using the OM SDK with server-side ad insertion (SSAI).

Getting started

Follow these steps to enable Open Measurement for Brightcove's SSAI plugin for Android:

  1. Create a new instance of OpenMeasurementTracker providing your organization namespace and the BrightcoveVideoView used for playback.

    OpenMeasurementTracker omTracker = new OpenMeasurementTracker.Factory(
        your partner name, your partner version, getBaseVideoView()
    ).create();
    
  2. Start the OpenMeasurementTracker before playback begins.

    omTracker.start();
    
  3. Stop the OpenMeasurementTracker when playback ends or when the activity is destroyed.

    omTracker.stop();
    

Advanced usage

Friendly Obstructions

If you have a view that is part of playback and should be considered a friendly obstruction, you can register it with Open Measurement. To do so, add the view, its purpose, and a message describing the view to the OpenMeasurementTracker. For example:

omTracker.addFriendlyObstruction(
    pauseButton,
    FriendlyObstructionPurpose.VIDEO_CONTROLS,
    "A pause button for the video player"
);

Open Measurement Listener

You can add an OpenMeasurementTracker.Listener to receive callbacks when ad events are triggered and when the tracker starts and stops for an ad session.

omTracker.addListener(new OpenMeasurementTracker.Listener() {
  @Override
  public void onEvent(AdEventType event) {

  }

  @Override
  public void onStartTracking() {

  }

  @Override
  public void onStoppedTracking() {

  }
}); 

Notes

The following notes apply to the Open Measurement integration:

  • The OM integration expects VAST data to contain AdVerifications elements. If these elements are not present for an inline ad, the ad will still play, but the OM session client will not record any ad events.