Skip to main content

🚩 Callbacks

Use the following callbacks to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.

Gleap.setEventCallback((name: String, data?: any) => {
if (name === "open") {
// Widget openend
}
if (name === "close") {
// Widget openend
}
if (name === "feedback-sent") {
// Feedback sent
console.log("Form data: ", data);
}
if (name === "flow-started") {
// Flow started
console.log("Flow: ", data);
}
if (name === "error-while-sending") {
// Error while sending
}
if (name === "custom-action-called") {
// Custom action called
console.log("Custom action: ", data);
}
});