ClickTag implementation for Amazon Ad Server
Amazon Ad Server (formerly Sizmek) uses the EventBus API to handle clickTag functionality in HTML5 creatives. This guide covers the implementation pattern, the required EBLoader.js script, common errors, and how Adloom validates and fixes Amazon Ad Server creatives. Note that Amazon Ad Server is being sunset; Innovid is the recommended migration path.
Deprecation notice
Amazon Ad Server is scheduled to be sunset. If you are building new creatives, consider migrating to Innovid (which acquired Sizmek in 2024). Adloom supports both platforms and can help convert creatives between them.
How Amazon Ad Server clickTag works
Amazon Ad Server (formerly Sizmek) provides the EventBus API, a global JavaScript interface for ad delivery and tracking. The EventBus exposes click and tracking methods that your creative calls to report user interactions to Amazon.
To use the EventBus API, your creative must include the EBLoader.js script from Amazon's CDN. This script defines the EB global object.
When a user clicks on your creative, you call EB.clickthrough('clickTAG') to register the click with Amazon Ad Server. The string clickTAG is the name of the variable Amazon will replace with the actual destination URL.
Standard implementation
Here is the recommended pattern for Amazon Ad Server clickTag implementation in your HTML5 creative:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ad Creative</title>
<script src="https://s0.2mdn.net/ads/common/loader.js"></script>
<style>
body { margin: 0; padding: 0; }
.ad-container { width: 300px; height: 250px; background: #000; cursor: pointer; }
</style>
</head>
<body>
<div class="ad-container" id="adElement"></div>
<script>
// Get the clickTAG from Amazon Ad Server
var clickTag = "https://example.com";
// Handle click
document.getElementById("adElement").addEventListener("click", function() {
EB.clickthrough("clickTAG");
});
</script>
</body>
</html>Key points: The EBLoader.js script is loaded from Amazon's CDN; the click is handled using EB.clickthrough('clickTAG') (note the capital TAG); the parameter passed to EB.clickthrough is the variable name, not the actual URL.
Understanding EB.clickthrough()
A common point of confusion: the parameter you pass to EB.clickthrough() is not the actual click-through URL. Instead, it's the name of a variable that Amazon Ad Server will replace at serve time.
When you upload your creative to Amazon Ad Server, you define a macro or variable named clickTAG in the creative's settings. Amazon replaces all occurrences of this variable name with the actual destination URL.
This is different from CM360, where you declare var clickTag = "https://..." and assign an actual URL. With Amazon Ad Server, you only pass the variable name to EB.clickthrough().
Common errors to avoid
Missing EBLoader.js script
Without loading the EBLoader.js library from Amazon's CDN, the EB global object will not exist, and your creative will throw JavaScript errors.
<!-- WRONG: Missing script -->
<body>
<script>
EB.clickthrough("clickTAG"); // ERROR: EB is undefined
</script>
</body>
<!-- CORRECT: Script loaded first -->
<head>
<script src="https://s0.2mdn.net/ads/common/loader.js"></script>
</head>Passing the URL instead of the variable name
EB.clickthrough() expects the variable name (e.g. "clickTAG"), not the actual URL. Passing a URL directly will not work correctly.
// WRONG: Passing URL directly
EB.clickthrough("https://example.com");
// CORRECT: Pass the variable name
EB.clickthrough("clickTAG");Wrong variable name case
The Amazon Ad Server API is case sensitive. Use clickTAG (lowercase "click", capital "TAG"), not clickTag, clicktag, or other variants.
// WRONG
EB.clickthrough("clickTag");
EB.clickthrough("clicktag");
EB.clickthrough("ClickTAG");
// CORRECT
EB.clickthrough("clickTAG");Using window.open() or window.location
Direct navigation bypasses Amazon's click tracking. Always use EB.clickthrough() to ensure clicks are properly recorded.
// WRONG: Bypasses tracking
window.open(clickTag, "_blank");
window.location = clickTag;
// CORRECT: Uses Amazon tracking
EB.clickthrough("clickTAG");Incorrect CDN URL for EBLoader
Amazon's EBLoader.js CDN URL is specific. Using an outdated or incorrect URL will result in the script failing to load.
<!-- CORRECT CDN URL -->
<script src="https://s0.2mdn.net/ads/common/loader.js"></script>How Adloom detects Amazon Ad Server clickTag
Adloom scans your creative for the Amazon EventBus API pattern. It looks for:
EB.clickthrough() call:
/EB\.clickthrough\s*\(\s*['"]clickTAG['"]\s*\)/EBLoader script tag:
/<script[^>]*src="[^"]*loader\.js[^"]*"[^>]*>/Adloom validates that the EBLoader.js script is included, that EB.clickthrough() is called with the correct variable name case (clickTAG), and that the script is loaded before the clickthrough call.
How Adloom auto-fixes Amazon Ad Server issues
If Adloom detects missing or incorrect Amazon Ad Server clickTag implementation, it can automatically fix it. Here's what happens:
<script src="https://s0.2mdn.net/ads/common/loader.js"></script> in the <head> section.EB.clickthrough('clickTAG') call with proper case.How Adloom helps
Validates EventBus API usage
Adloom checks that you are using the correct Amazon Ad Server API call (EB.clickthrough()) with the proper variable name case.
Ensures EBLoader.js is loaded
Adloom confirms that your creative includes the required EBLoader.js script from Amazon's CDN. If missing, it injects the correct script tag automatically.
Verifies click tracking
Adloom checks that your creative uses EB.clickthrough() instead of direct navigation, ensuring Amazon's tracking and reporting work correctly.
One-click auto-fix
Use Adloom's "Fix all" button to inject correct Amazon Ad Server clickTag implementation, load the EBLoader.js script, and fix click tracking in one click.
Migration support to Innovid
Since Amazon Ad Server is being sunset, Adloom can help prepare your creatives for migration to Innovid. See our Innovid guide for more information.
Next steps
- Innovid clickTag implementation: recommended migration path from Amazon Ad Server.
- Adform clickTag implementation: DHTML API pattern.
- Getting started with Adloom: upload a creative and see Adloom's detection in action.