ReactNative
Callbacks
Get Started
SDKs
- Javascript
- iOS
- Android
- ReactNative
- Introducing
- User identity
- Track events
- Track pages
- AI tools
- Forms
- Push notifications
- In-app notifications
- Audio recording
- Console logs
- Custom actions
- Ticket attributes
- Custom data
- Callbacks
- Tags
- Feedback button
- Network logs
- Translations
- Widget control
- Prefill the widget form
- Conversations
- Feature requests
- Help center
- Release notes & news
- Surveys
- Checklists
- Flutter
- FlutterFlow
- Ionic / Capacitor
- Cordova
ReactNative
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);
});