# Javascript Callbacks

## Introduction <a href="#introduction" id="introduction"></a>

iAdvize provides Javascript callbacks functions that can be used to perform actions on specific events.

Some callbacks have a parameter that contains data specific to the triggered event.

## How to use callbacks <a href="#how-to-use-callbacks" id="how-to-use-callbacks"></a>

To execute custom code during an iAdvize callback function you have to define the callbacks you want to use in a `window.iAdvizeCallbacks` object.

{% hint style="warning" %}
Please note that the `window.iAdvizeCallbacks` must be defined before the main iAdvize tag.
{% endhint %}

## &#x20;<a href="#guides-callbacks" id="guides-callbacks"></a>
