Clear search
Close search
Google apps
Main menu

HTML5 banner build guide

Add the HTML5 Enabler

The Enabler is the core code library of DoubleClick Studio. Think of it as the brain of the creative. All components and API calls must go through the Enabler. The Enabler library is required for all rich media creatives. By adding the Enabler component, you automatically ensure that your creative:

  • includes standard tracking functionality for metrics like display time, number of impressions, interactive time, and other standard metrics
  • can handle more complex features like video and expand functionality

Add the Enabler

To the <head> tag of your HTML file, add a script tag that links to the Enabler:

<script src=""></script>

This provides a singleton object in the global namespace called Enabler. To call methods on it, call Enabler.isInitialized(), Enabler.exit(), and so on.

Wait for Enabler initialization

Nothing in the ad should auto-execute until the Enabler has initialized. This ensures that everything is properly loaded and Enabler methods can be accessed before a user interacts with the ad.

In your JavaScript, verify that the Enabler has initialized using the Enabler’s isInitialized method, which returns true or false. If true, make the call to start your function, in this example, enablerInitHandler(). If false, make a fallback call that listens for the Enabler’s INIT event.

// If true, start function. If false, listen for INIT.
window.onload = function() {
  if (Enabler.isInitialized()) {
  } else {
    Enabler.addEventListener(, enablerInitHandler);

function enablerInitHandler() {
  // Start polite loading, or start animation,
  // load in your image assets, call Enabler methods,
  // and/or include other Studio modules.

Once the Enabler has initialized, start animation, load in your image assets, and call tracking methods, or include other Studio modules.

Update the Enabler

When a new version of the Enabler is released, you'll see a warning that your creative's Enabler version is out of date in the Studio UI. To upgrade to the latest version of the Enabler, re-upload the creative's primary HTML asset.

Was this article helpful?
How can we improve it?