Open Measurement

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.

    Note: If you are using VAST 2.X or 3.X, include <AdVerifications> as an <Extension> under <Extensions>.

  2. Include your vendor key (to identify whether you have extra parameters that need to be sent to your verification script) inside the <Verification> tag.

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

Note: Verification parameters are optional.

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.

Note: When registering the session observer, always include a vendor key that matches the vendor=’key’ attribute in the <Verifications> node.

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