Note
Note: To learn more about this format, preview a demo, or to see build guides for other authoring tools, see About interstitial.
When creating an interstitial in a code editor, it is recommended that you start with our official template.
Files within the bundle:
README.txt
Amz_Interstitial_1_0_1.zip
Amz_Interstitial_1_0_1_DCO.zip
Amz_Interstitial_1_0_1_Video.zip
Amz_Interstitial_1_0_1_Video_DCO.zip
Download the template, and then select the desired folder from the list of available dimensions and options.
You can also customize the dimensions according to your requirements. Everything can be personalized, including media controls of the video.
The following table describes the list of files that are included in the downloadable template.
The following table describes the additional files that are included in a video template.
After you finish creating your ad, proceed to setting up your ad in AAS. For more information, see Set up an interstitial.
The config.js
file includes the manifest ad data. This file contains metadata used to configure the ad in AAS during the upload. For more information about the Manifest files, see Manifest Ad Data.
If you are developing ads with third-party libraries, we recommend that you call these libraries from a CDN (Content Delivery Network) when possible. This will help improve loading time and caching.
If you need to add Dynamic Creative Optimization (DCO) elements to your creative, see Add dynamic elements to your HTML ads using a code editor .
The following tables provide additional variables and functions that are available for this format. You can use these additional items to fully customize your ad.
These variables are located in the panels/default/scripts/script.js
file.
Variable Name |
Description |
Type |
Editable |
---|---|---|---|
|
Global variables used to define HTML objects. Add, edit, or remove these variables as you modify HTML objects. |
String |
|
|
These variables store values that are necessary for the ad to run properly after the upload to AAS. ImportantImportant: Do not make changes to these variables. |
Boolean |
These functions are located in the panels/default/scripts/script.js
file.
Function Name |
Description |
Additional Code Allowed |
---|---|---|
|
Initializes the creative. You can add your own script if you want to run a script when the creative is initialized. |
|
|
Initializes the global variables for HTML objects. In the template, |
|
|
Initializes the close button. Whether to display the close button is based on the serving environment and custom variable. |
|
|
Initializes the video based on the serving environment and custom variable. Determines how to serve the video object and add video tracking to the video module when possible. |
|
|
Adds all of the event listeners. In the template, the click event for the click-through and user action counter was added. In addition, the |
|
|
Invoked when creative container is ready, and starts the auto collapse timer. You can add your own function if you want the function to trigger when the creative container is ready. |
|
|
Invoked to close the panel, and enable the page scrolling before the ad is collapsed. This function also pauses the video. |
|
|
Click event handler for user action button. Calls and tracks the user action. This function also pauses the video. |
|
|
Click handler for the click-through button. Calls this function for the default click-through. This function also pauses the video. |
|
|
Pauses the video. |
|
|
Handles the event when a user moves the video slider. |
|
|
Handles the event when a video enters or exits full screen. |
|
|
Starts the auto collapse timer. |
|
|
Stops the auto collapse timer. |
|
|
Blocks page scrolling. NoteNote: Ads prevent page scrolling by turning off the touchmove event. If your content uses the touchmove event, verify whether to set the custom variable |
|
|
Allows page scrolling. |
|
|
Blocks the default behavior from any passing event. |
Click here to preview a demo of interstitial format.
Comments