Javascript API
Callback Functions
Javascript callback functions for Aimtell
Callback functions work in the opposite direction to the rest of the Javascript API: instead of you calling Aimtell, Aimtell calls you. You define these functions on your page, and the Aimtell script runs them when the matching event happens: the script finishing loading, or a visitor granting, ignoring or denying push permission.
Each one is optional. If you haven’t defined it, nothing happens.
Define them as regular global functions using the exact names below, and make sure they exist before the Aimtell script loads.
Description: Called when aimtell script has finished loading.
Description: Called after website visitor has granted push notification permissions.
Description: Called after website visitor has ignored push notification permissions. (clicking “x” on the request dialog)
Description: Called after website visitor has denied push notification permissions.

