Note: To learn more about Dynamic Creative Optimization (DCO), or to view guides about other authoring tools, see Introduction to dynamic creative.
The following sections describe how to define dynamic elements manually for HTML ads that are hand-coded in a code editor.
The Dynamic Creative feature uses the Amazon Ad Server (AAS) creative AdKit for developers. AdKit includes ad-related functionalities that provide quick and easy development of your HTML ads.
Important: Make sure to properly load the AdKit API before building your dynamic creative. For more information, see Load and Initialize the API.
AdKit implements Dynamic Creative with the following dynamic data types:
HTML Components: HTML code fragments that are inserted automatically into HTML tags in the ad’s
Adding Dynamic Creative to HTML ads requires configuring and placing the following files in the root folder of the Workspace.
The ad’s main creative file. Includes the AdKit script that runs the
Use one or both of the following methods to configure dynamic data types:
Method A: Define variables inside your
Method B: Map HTML tag IDs from your
index.htmlfile to items in your
config.jsfile, to automatically update the
index.htmlwith dynamic adkit-components.
You can use both methods in the same ad.
The following example uses both methods to demonstrate how to convert a
div that has the ID
BookPrice into a dynamic element.
divwith the ID
<div id="BookPrice"> </div>
Save your file.
Before starting to configure the dynamic elements, create a
div, and make sure its ID is defined.
Important: Please note that if you are using a dynamic video element, it will be tracked automatically. You should not manually include or initialize the Video Module, as this can result in duplicate tracking of video progress and events.
Once you upload your ad to AAS , the Versions tab is available from the Ad Setup page. The Versions page includes the HTML and variable items that you defined in the
config.js file. For more information about versioning, see Work with versions of a dynamic creative ad.