The Gleam widget can send events which you can listen for on your page using the following JavaScript.
Callbacks can be turned on via the widget "Install Options" tab for accounts on our Business and Premium plans.
This is useful for:
Each entered
event includes a unique ID for the action that has been completed:
<script>
window.onGleamEvent = function(event) {
console.log(event);
/*
Logs an object like this:
{
type: "entered",
campaign: { key: "MqJxR", name: "My Newsletter Competition" },
action: { id: 4242, title: "Sign up for our newsletter" }
}
OR
{
type: "loaded",
campaign: { key: "MqJxR", name: "My Newsletter Competition" }
}
*/
};
</script>