Ad Builder provides you with a wide range of pre-configured actions and animations to meet most requirements.
If you still need to add JavaScript code to your ad, use the dedicated JavaScript editor accessible from the Run JavaScript action.
-
In the Properties pane, open the Actions and Animations pane.
-
Create an event for the component to which you want to add JavaScript code. This example shows adding a Tap/Click event to a hotspot.
-
Under Add Action > New Action > Select Action, select Custom Actions > Run JavaScript.
-
Click Open Code Editor.
-
Define your JavaScript code, and then click Apply. You do not need to add the
<script>
tag; simply enter your JavaScript code. This example shows adding a confirm dialog box. -
Click Preview, and verify that your code is running correctly on the ad.
Comments