🚩 Callbacks
The following event listeners allow you to listen for specific events allowing you to build deeper integrations with the Gleap widget.
Gleap.registerListener('initialized', () => {
// Initialized
console.log('Gleap is now initialized. You can now interact with the SDK.');
});
Gleap.registerListener('notificationCountUpdated', (count) => {
// Unread notification count updated.
console.log('notificationCountUpdated', count);
});
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 form was opened.
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);
});