Javascript
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.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Gleap.on("initialized", () => {
console.log("Gleap got initialized and is ready :)");
});
Gleap.on("unread-count-changed", (unreadCount) => {
console.log("unread-count-changed", unreadCount);
});
Gleap.on("open", () => {
console.log("Gleap did open.");
});
Gleap.on("close", () => {
console.log("Gleap did close.");
});
Gleap.on("productTourCompleted", (data) => {
console.log(data);
});
Gleap.on("conversation-started", (data) => {
console.log("User started a new conversation with optional workflow.");
console.log(data.workflowId);
});
Gleap.on("feedback-sent", (formData) => {
console.log("Gleap did send a feedback item.");
console.log(formData);
});
Gleap.on("outbound-sent", (outboundData) => {
console.log("Gleap did send survey results.");
console.log(outboundData);
});
Gleap.on("rating-sent", (outboundData) => {
console.log("User submitted conversation rating.");
console.log(outboundData);
});
Gleap.on("flow-started", (flow) => {
console.log("The user selected a flow");
console.log(flow);
});
Gleap.on("error-while-sending", () => {
console.log("Ouch, something went wrong.");
});
Gleap.on("checklist-loaded", (data) => {
console.log("Checklist loaded:", data);
});
Gleap.on("checklist-step-completed", (data) => {
console.log("Step completed:", data.stepId);
});
Gleap.on("checklist-completed", (data) => {
console.log("Checklist completed!");
});