Open Measurement

Implement the IAB Open Measurement SDK to support third-party viewability and verification for in-app ads.
Read time 1 minuteLast updated 4 hours ago

Unity supports Open Measurement (OM) third-party verification code with your video ad. For more information, refer to the the IAB's OM spec.

VAST tag

To implement OM code in your VAST tag, complete the following steps:
  1. Include the
    <AdVerifications>
    node. For more information, refer to section 3.16 of the VAST guidelines.
  1. Include your vendor key (to identify whether you have extra parameters that need to be sent to your verification script) inside the
    <Verification>
    tag.
  2. Include the verification script inside the
    <JavaScriptResource>
    tag.
<AdVerifications>
	<Verification vendor="company.com-omid">
		<JavaScriptResource apiFramework="omid" browserOptional="true">
			<![CDATA[https://verification.com/omid_verification.js]]>
		</JavaScriptResource>
		<VerificationParameters>
			<![CDATA[verification params key/value pairs]]>
		</VerificationParameters>
	</Verifications>
</AdVerifications>

JavaScript resource

Include a verification script in the
<JavaScriptResource>
tag that immediately registers session observers, video events, and ad events to simplify event management and ensure that all events are called in order.
The following list details the macros that Unity supports if they are provided in the tracking URL:
  • %OM_ENABLED%
    • Defaults to
      false
      .
    • If VAST supports OM, set to
      true
      .
  • %OM_VENDORS%
    • An identifier for the OM SDK integration.
    • This is the same as the
      name
      and
      versionString
      parameters of the
      OMIDPartner
      object.
Example of a simple verification script

OMID troubleshooting

If an error occurs, a tracking pixel's
[REASON]
macro might return one of the following reasons:
  • VERIFICATION_RESOURCE_REJECTED
  • VERIFICATION_NOT_SUPPORTED
  • ERROR_RESOURCE_LOADING