PRODUCT

Amazon Ad Server will be sunset in Q4 2024, please visit this page (AAS offboarding information) for offboarding support resources and sunset FAQs. Details shared on that page represent the most up to date information in the Help Center, if you find disparate information in other resources please default to the information in the AAS offboarding information page accordingly.

Please note that on October 1, 2024, the ability to create new campaigns, placements, and tag managers will be disabled.

Follow

Overview

Amazon Ad Server (AAS) 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.

Note

Note: If the user is experiencing any 3rd party script loading issues, the loading order may need to be switched relative to the AAS scripts (EBLoader or AdKit).

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);

Note

Note: AAS does not support minified scripts and relies on new lines to support AdKit.

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