Select platform: [HTML5](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/omsdk.md.txt "View this page for the HTML5 platform docs.") [Android](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/omsdk.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/omsdk.md.txt "View this page for the iOS platform docs.")

<br />

The IMA SDK for HTML5 includes the
[Open Measurement (OM) SDK](https://iabtechlab.com/standards/open-measurement-sdk/),
an industry standard developed by the
[Interactive Advertising Bureau (IAB)](https://www.iab.com/) 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 using the
OMID API. You can optionally set access mode rules for each request to control
what content the verification script can access.

The IMA SDK supports OM SDK v1.6.

## Prerequisites

- If using VAST 4.1 or higher, ads must be configured to supply verification
  using `<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](https://support.google.com/admanager/answer/9025968#configure-a-viewability-provider).

## Access modes

The OM SDK supports running verification scripts in four different access modes
which controls how much the verification script can access:

- `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.

- `LIMITED`: The verification script is sandboxed and cannot access the creative
  or publisher page, and cannot directly confirm what publisher domain it is on.

Some viewability providers might not support all access modes. Contact your
viewability providers to verify which modes are supported. Previously, IMA
supported a `DOMAIN` access mode, which now defaults to `LIMITED` mode.

## Set the access mode rules for a request

Access mode rules must be set at the [`AdsRequest`](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima.AdsRequest#omidAccessModeRules) level. To set different access modes for different verification script providers, pass a dictionary that maps each [`OmidVerificationVendor`](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor) to one of the access modes listed above. The `OmidVerificationVendor.OTHER` field is used to set the default access mode for all vendors not explicitly included in the dictionary. If no access mode rules are specified, verification scripts run in `LIMITED` access mode for vendors.

<br />

See the following example which sets `GOOGLE` to
`google.ima.OmidAccessMode.FULL`. All other providers, including those
listed in
[`OmidVerificationVendor`](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/reference/js/google.ima#.OmidVerificationVendor),
default to how `OmidVerificationVendor.OTHER` is set.

```javascript
request.omidAccessModeRules = {};
request.omidAccessModeRules[google.ima.OmidVerificationVendor.GOOGLE]
    = google.ima.OmidAccessMode.FULL;
request.omidAccessModeRules[google.ima.OmidVerificationVendor.OTHER]
    = google.ima.OmidAccessMode.LIMITED;
```


To implement `CREATIVE` access mode, you must follow both of the following
steps:

1. Sandbox your video player in a secure iframe, isolated from the rest of your
   site.

2. Set the `OmidAccessMode` for your viewability partner to `FULL`.