PRODUCT
Follow

Overview

Sizmek Ad Suite (SAS) provides two loader scripts, EBLoader and AdKit, to incorporate our HTML capabilities using the authoring environment of your choice. One of these loader scripts must be included in all the HTML files you create your ad using the HTML Workspace API.

The EBLoader script was the first script used to build ads with the Workspace technology; and although EBLoader is still supported, we recommend using AdKit, since it is the most advanced and offers additional functionality.

AdKit

The AdKit script loads the EB and the AdKit objects, enabling you to use any of the API methods and components.

The AdKit declaration must be present in all the ad’s HTML files. To include the declaration, copy the following code in the <head> element of the HTML files.

<script type="text/javascript" src="https://secure-ds.serving-sys.com/BurstingScript/adKit/adkit.js"></script>

Once the HTML DOM is loaded, you should check if the AdKit library is already available using the onReady method.

function checkIfAdKitReady(event) {
    adkit.onReady(startAd);
}
function startAd() {
    // This function is executed once the adkit library is available.
}
window.addEventListener("load", checkIfAdKitReady);

EBLoader

The EBLoader script loads the EB object, so you cannot access any of the AdKit methods and components.

The EBLoader declaration must be present in all of the ad’s HTML files. To include the declaration, copy the following code in the <head> element of the HTML files.

<script type="text/javascript" src="https://secure-ds.serving-sys.com/BurstingScript/EBLoader.js"></script>

Once the HTML DOM is loaded, use the following code to check if the EBLoader library is available:

function checkIfEBLoaderReady(event) {
    if (!EB.isInitialized()) {
        EB.addEventListener(EBG.EventName.EB_INITIALIZED, startAd);
    } else {
        startAd();    
    }
}
function startAd() {
    // This function is executed once the EB Object is available.
}
window.addEventListener("load", checkIfEBLoaderReady);
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments