Video Advertising Suite

Docs

> Documentation-Index > Setup Guide

smartClientCore

Global Config

debug : Boolean

Enables log output to the console from the start. In addition, the log output can be activated at runtime by calling localStorage.setItem ('debug', true);.

blockInsecureURL : Boolean

By default insecure URL requests (tags, tracker, media files) will not be executed within secure environment. Default is true.

maxWrapperDepth : number

When serving an ad involves a chain of wrappers, an infinite loop is possible where a chain of Wrappers never results in a final inline VAST response. In general, wrappers should be limited to ten before resulting in an inline response. If the smartclientcore detects more than ten wrappers, the smartclientcore rejects any subsequent responses in the chain and returns VAST error 302. Default limit is 10 wrappers.

adRequestMethod : string

By default, ads are requested through XHR. This may not work with applications which target devices that do not support CORS or have not implemented the XMLHTTPRequest object, especially HbbTV apps for SmartTVs. As an alternative, ads can be requested through JSONP. Possible values are smartclientcore.AD_REQUEST_METHOD.XHR (the default if omitted) and smartclientcore.AD_REQUEST_METHOD.JSONP.

adReinsertion : Object

homad : Object

The smartclientcore has been extended with the HOMAD HTML5 solution to help bypassing ad-blockers. All ad-related resources (tags, creative files, trackers) will be redirected to HOMAD once they get blocked for any reason.

enabled : Boolean - Enables HOMAD ad-reinsertion. Disabled by default.

setup : Object - HOMAD configuration

Param Type Description
globalConfig string URI to HOMAD's global configuration file.
clientConfig string URI to the client-specific configuration file.
enableSessionCoverage Boolean Decide whether ad-blockers should be detected again when requesting a new ad-break (default behavior) or not.

Disabled by default.
forceActivation Boolean Forces AdReinsertion through HOMAD from the start and affects all ad-tag requests, tracking and ad asset requests.

The smartclientcore responds with the ON_AD_REINSERTION_ACTIVATION (AdReinsertionActivation) event once HOMAD has been enabled and calling initAdSlot() is safe.

**_Note**: AdReinsertion reasons are detected again with each new ad-slot, see adReinsertion.setup.enableSessionCoverage. This flag should be turned on (true). Otherwise AdReinsertion is turned off after the first ad-slot._
activationCallback(reason number) Promise Is called whenever the smartclientcore detects a scenario that blocks or would block an ad-related request.
Based on the specified reason the player has to decide whether the current ad-slot must be requested again through HOMAD or not.

Resolves if the publisher decides to re-call the current ad-break through HOMAD.

If the activationCallback is omitted or does not respond within 250 milliseconds, HOMAD will be automatically activated (if enabled before).

let globalAdConfig = smartclientcore.SCHEMA.create(smartclientcore.SCHEMA.GLOBAL_CONFIG);
globalAdConfig.adReinsertion = {
    homad: {
        enabled: true,
        setup: {
            globalConfig: 'https://s3.amazonaws.com/homad-global-configs.schneevonmorgen.com/global_config.json',
            clientConfig: 'https://test.s3.amazonaws.com/homad/homadConfigTestHttps.json',
            enableSessionCoverage: true,
            forceActivation: true,
            activationCallback: (reason) => {
                return new Promise((resolve, reject) => {

                    // The reason for activating HOMAD sounds reasonable?
                    resolve();

                    // otherwise
                    //reject();
                });
            }
        }
    }
};

Activation Reason - Codes Table

Code Description
1000 Timeout of ad-request URIs
1001 XHR request status is not 200 (ok)
1002 XHR request error
1003 XML parsing error
1004 Timeout of wrapper request chain
1005 Requesting the entire AdSlot timed out
1010 Timeout of media file request URIs
1013 General load error of media file URIs
1020 General ad-reinsertion activation request

adVerification : Object

Ad-verification vendors that rely on the Open Measurement (OM) Interface Definition API are enabled by default. The following properties may be adjusted to enable selected verification vendors only and to limit the measurement session execution time.

More information on OMID and OM SDK available at: IAB

disabled : Boolean - Ad verification is enabled by default. Disable carefully.

Disabling OM should be limited to two situations: If the OM integration is interfering with your site (app), or if there is a bug in the integration that generates bad OM data.

vendorWhitelist : [ 'Array' ].<string> - List of accepted AdVerification vendors (whitelist). Each specified String has to represent an unique identifier that can be found within the verification code resource URI, most likely the domain name.

If omitted, the smartclientcore tries to load verification code from each vendor.

sessionCleanupDelay : number - Time value in seconds that specifies a delay for closing the current measurement session after the ad has finished playback. Default is 3 seconds.

The verification code should have sufficient time to ensure any measurement and reporting is completed before cleaning up, in order to minimize discrepancies.

timeoutScriptLoad : number - Representing the number of seconds a OMID vendor can take to load and initialize its code before being terminated. Defaulting to 1 seconds if omitted.

playerHandles : Boolean - Whether the player takes responsibility for Open Measurement, e.g. native implementations of OMID. Defaulting to false if omitted.

accessMode : String - Execution mode of the verification script. Needs to be either limited, domain, creative or full.
Defaulting to full if omitted.

serviceWindow : Window - Optional. The DOM context into which the OM SDK Service Script was loaded. The value becomes forwarded to the OM SDK Context setServiceWindow method as described in the OM SDK for Web Video documentation. Defaulting to window.top if omitted.

If necessary, the context for each ad-slot can be updated by setting the service window again through EnvironmentVars.omidServiceWindow

skipOffset : number

Time value in seconds that identifies when skip controls are made available to the end user by default. Advertisers may define a skipoffset value in its VAST tag that has higher priority than the publisher setting.

timeouts : Object

let globalAdConfig = smartclientcore.SCHEMA.create(smartclientcore.SCHEMA.GLOBAL_CONFIG);
globalAdConfig.timeouts = {
    adRequest: 1,
    adRequestChain: 2,
    adSlotRequest: 4,
    contentRequest: 3,
    nonlinearMaxDuration: 10,
    videoRequest: 3,
    vpaidReadiness: 3,
    vpaidRequest: 1
};

adRequest : number

The number of seconds a single ad request can take to load before being terminated.
Default is 1 seconds.

adRequestChain : number

The total number of seconds a single ad request chain (VAST Wrappers and final VAST Inline tag) can take to load before being terminated.
Default is 2 seconds.

adSlotRequest : number

The total number of seconds an ad-slot request (from calling initAdSlot until the Promise resolves or rejects) can take before being terminated.
Default is 4 seconds.

contentRequest : number

The total number of seconds the video player can take to answer the releaseContent request to the player facade (see FacadeBase.releaseContent()). If the Promise is neither resolved nor rejected within the specified time, the AdSlot becomes terminated. The smartclientcore responds by sending a general error with code 11 (ERROR_CODE.SESSION.NOT_RESTORABLE) and message SessionError: Reset content timed out. Player did not respond. Default is 3 seconds.

nonlinearMaxDuration : number

The maximum time in seconds a NonLinear ad is displayed (from triggering the impression) before being terminated. Note: The timer becomes paused for the time a creative has entered the linear state.
Default is 10 seconds.

videoRequest : number

Representing the number of seconds a video creative can take to load before being terminated.
Default is 3 seconds.

vpaidReadiness : number

Representing the number of seconds a VPAID creative can take to initialize and respond (from calling VPAID.initAd() until the creative triggers the AdLoaded event) before being terminated.
Default is 3 seconds.

vpaidRequest : number

Representing the number of seconds a VPAID creative (JavaScript resource) can take to load before being terminated.
Default is 1 seconds.

trackImpressionOnStart : Boolean

Defines whether the trackers impression and creativeView are requested at the time a video ad is loaded or when the video player actually starts playing (start, 0%). The difference is most noticeable with video players or browsers that prevent autoplay without user interaction. The impression and creative view trackers are requested immediately, while the start tracker is requested after a delay, depending on when playback starts. Defaulting to false if omitted.

trackSkippedQuartiles : Boolean

Defines whether to track all VAST progress trackers (start, firstQuartile, midpoint, thirdQuartile and complete), regardless of whether some of them were somehow skipped or to just request VAST progress trackers that were actually triggered by a matching playhead update. Possible "skip" use cases are the user seeks over one or multiple progress points, or the timeupdate interval from the video player is too long. Defaulting to false if omitted.

viewability : Object

let globalAdConfig = smartclientcore.SCHEMA.create(smartclientcore.SCHEMA.GLOBAL_CONFIG);
globalAdConfig.viewability = {
    area: 50,
    time: 2
};

The Media Ratings Council (MRC) has published the following as recommendations for video viewability. How a video ad is counted when 50% of the ad's pixels are visible for at least two seconds. Publishers should disclose their process for tracking viewable video impressions.

area : number

The percentage of how many pixels of an ad must be in the visible area for the visibility time measurement to begin. Default is 50 pixel.

time : number

The number of seconds a single ad must be visible before a viewable tracker can be triggered.
Default is 2 seconds.