Open Measurement

The IMA SDK for HTML5 includes the Open Measurement (OM) SDK, an industry standard developed by the Interactive Advertising Bureau (IAB) to enable third-party viewability and verification measurement. When using the IMA SDK for HTML5, the included OM SDK automatically parses the <AdVerifications> tag within VAST ad tags and sends viewability data to the specified measurement vendors via the OMID API. You can optionally set access mode rules for each request to control what content the verification script can access.

Prerequisites

  • To enable OMID for web during public beta, the enableOmidBeta feature flag must be set to true. To set this feature flag, insert the line after requesting the SDK, but before any other IMA-related code.
  • If using VAST 4.1 or higher, ads must be configured to supply verification via <AdVerifications>. If using previous VAST versions, ads must use <Extension type="AdVerifications">.
  • If your ads are trafficked through Ad Manager, configure a viewability provider for your Ad Manager network and assign that viewability provider to your line item. For more information, see Configure a viewability provider for your Ad Manager network.

Access modes

The OM SDK supports running verification scripts in different access modes, which control how much the verification script can access. The four access modes are:

  • FULL: The verification script has direct access to the creative and the publisher page.
  • CREATIVE: The verification script and creative are sandboxed from the publisher page. However, the script has direct access to the creative.
  • DOMAIN: The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on.
  • LIMITED: The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on.

Setting access mode rules for a request

Access mode rules must be set at the ad-request level. To set different access modes for different verification script URLs, pass a dictionary that maps each access mode to a regular expression that matches the URLs to include. If a URL matches multiple regular expressions, the URL runs in the most restrictive mode matched (LIMITED > DOMAIN > CREATIVE > FULL). If no access mode rules are specified for a request, verification scripts run in LIMITED access mode for all URLs.

request.omidAccessModeRules = {};
request.omidAccessModeRules[google.ima.OmidAccessMode.FULL] = [
    new RegExp('^examplevendor1\\.com/.*$'), ...
];
request.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN] = [
    new RegExp('^examplevendor1\\.com/.*$'), ...
];
request.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED] = [
    new RegExp('^examplevendor1\\.com/.*$'), ...
];