Skip to main content

🚩 Callbacks

The following event listeners allow you to listen for specific events allowing you to build deeper integrations with the Gleap widget.

Gleap.registerListener('feedbackSent', (data) => {
// Feedback has been sent with data.
console.log('feedbackSent');
console.log(data);
});

Gleap.registerListener('feedbackSendingFailed', () => {
// Sending feedback failed.
console.log('feedbackSendingFailed');
});

Gleap.registerListener('feedbackFlowStarted', (flow) => {
// A feedback flow was started.
console.log('feedbackFlowStarted');
console.log(flow);
});

Gleap.registerListener('widgetOpened', () => {
// Widget opened.
console.log('widgetOpened');
});

Gleap.registerListener('widgetClosed', () => {
// Widget closed
console.log('widgetClosed');
});

Gleap.registerListener('customActionTriggered', (data) => {
// Custom action triggered.
console.log('customActionTriggered');
console.log(data);
});