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.
The IMA SDK supports OM SDK v1.3.
Prerequisites
- 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 providers,
pass a dictionary that maps each OmidVerificationVendor to one of the access modes
listed above. OmidVerificationVendor.OTHER
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.
See the following example which sets GOOGLE
to
google.ima.OmidAccessMode.FULL
. All other providers, including those
listed in OmidVerificationVendor,
default to how OmidVerificationVendor.OTHER
is set.
request.omidAccessModeRules = {};
request.omidAccessModeRules[google.ima.OmidVerificationVendor.GOOGLE] = google.ima.OmidAccessMode.FULL;
request.omidAccessModeRules[google.ima.OmidVerificationVendor.OTHER] = google.ima.OmidAccessMode.DOMAIN;