You must specify an access level for each verification script resource. The options are:
Please find the definition(s) and implementation steps for each. Note: if you are an ads SDK/video player integrator, you will need to provide 4 versions for testing (Full, Creative, Domain and Limited). If you are a publisher integrator you will need to provide versions for the access mode(s) you intend to use.
Access mode is a choice publishers make when implementing OM SDK. The publisher makes this choice whether they are integrating directly, or through a Video Player or ads SDK with a certified integration. Please talk to measurement provider(s) directly regarding the necessary support given your chosen access mode.
Full access mode is when a verification script can access the entire page. This mode enables the measurement tags to directly measure and verify ad creatives. The JavaScript also functions as a conduit to deliver the measurement provider script to the video player. Implementation:
const OMSDK_SERVICE_WINDOW = window.top;
// Assuming you have an `ad` object roughly following VAST 4.1 schema.
const resources = ad.adVerifications.map((verification) => {
const scriptUrl = verification.javaScriptResource.cdata;
const accessMode = 'full';
return new VerificationScriptResource(scriptUrl, verification.vendor,
verification.verificationParameters, accessMode);
});
const context = new Context(partner, resources, CONTENT_URL);
context.setServiceWindow(OMSDK_SERVICE_WINDOW);
Creative access mode is when a verification script can access the creative element (either in the same iframe or from a friendly iframe). The accessMode
value is “Full” for Creative access but script access is limited to the creative element instead of the entire page. This mode enables the measurement tags to directly measure and verify ad creatives.
Implementation:
const OMSDK_SERVICE_WINDOW = window.top;
// Assuming you have an `ad` object roughly following VAST 4.1 schema.
const resources = ad.adVerifications.map((verification) => {
const scriptUrl = verification.javaScriptResource.cdata;
const accessMode = 'full';
return new VerificationScriptResource(scriptUrl, verification.vendor,
verification.verificationParameters, accessMode);
});
const context = new Context(partner, resources, CONTENT_URL);
context.setServiceWindow(OMSDK_SERVICE_WINDOW);
**NOTE: to confirm correct implementation of access mode between Full and Creative use the friendlyToTop
signal in the compliance verification script.
friendlyToTop
signal means that the SDK has access to the top window
Access Level | Definition | accessMode | Compliance Script friendlyToTop |
---|---|---|---|
Full | Full page | full | true |
Creative | iframed creative | full | false |
Domain | sandboxed iframe | domain | false |
Limited | sandboxed iframe | limited | false |
In this mode, the measurement provider JavaScript tags load into a sandboxed iframe with specific settings and additional requirements. This mode allows the publisher to restrict measurement provider JavaScript from access to the ad creative. At the same time it allows measurement providers to confirm the domain or publisher website on which the ad is being displayed. If domain access mode is selected, the publisher is required to host a file (OM SDK Domain Loader) on the publisher domain which is used to demonstrate a web page’s domain to the JavaScript loaded. More detailed instructions may be found in the Domain Access Validation Documentation.
Voluntary registration is explained in the following section so that measurement providers can trust their implementation of domain access mode. Measurement providers may require additional validation to provide measurement with domain access mode.
Implementation:
const OMSDK_SERVICE_WINDOW = window.top;
// Assuming you have an `ad` object roughly following VAST 4.1 schema.
const resources = ad.adVerifications.map((verification) => {
const scriptUrl = verification.javaScriptResource.cdata;
const accessMode = 'domain';
return new VerificationScriptResource(scriptUrl, verification.vendor,
verification.verificationParameters, accessMode);
});
const context = new Context(partner, resources, CONTENT_URL);
context.setServiceWindow(OMSDK_SERVICE_WINDOW);
and publisher implements Domain Loader.
In this mode, the measurement provider JavaScript tags load into a sandboxed iframe. Measurement scripts that load into any such sandboxed iframe cannot measure the ad creative directly and, as a result, require the SDK JavaScript to pass measurement events to the measurement scripts using the API for OMID Client Libraries.
Implementation:
const OMSDK_SERVICE_WINDOW = window.top;
// Assuming you have an `ad` object roughly following VAST 4.1 schema.
const resources = ad.adVerifications.map((verification) => {
const scriptUrl = verification.javaScriptResource.cdata;
const accessMode = 'limited';
return new VerificationScriptResource(scriptUrl, verification.vendor,
verification.verificationParameters, accessMode);
});
const context = new Context(partner, resources, CONTENT_URL);
context.setServiceWindow(OMSDK_SERVICE_WINDOW);