The launcher is one way in. The SDK is the other, and it's how you connect Gleap to the help menu, empty states and error screens you already have.
All examples are JavaScript; the other SDKs have the same methods.
Gleap.open();
Gleap.close();
Gleap.isOpened(); // true / falseTo run without the floating launcher entirely — your own button, nothing of Gleap's:
Gleap.showFeedbackButton(false);Landing someone on the messenger home when you know what they want is a wasted click. Each of these opens straight to the point:
Gleap.openHelpCenter();
Gleap.openHelpCenterArticle("42");
Gleap.openHelpCenterCollection("7");
Gleap.searchHelpCenter("invoice");
Gleap.openConversations();
Gleap.startConversation();
Gleap.openNews();
Gleap.openFeatureRequests();
Gleap.openChecklists();Most take an optional showBackButton. Pass false when you're sending someone to one specific thing and a back button would just offer a place they never came from.
A help icon that runs searchHelpCenter with the current screen's name is a small change that answers a lot of questions before they're asked.
Gleap.startBot("BOT_ID");
Gleap.startClassicForm("FORM_ID");
Gleap.startProductTour("TOUR_ID");
Gleap.startChecklist("CHECKLIST_ID");
Gleap.showSurvey("SURVEY_ID");This is how a tour starts after your own onboarding step rather than on a page rule, or a bug form opens from your error boundary with the failure already in context.
For AI:
Gleap.askAI("How do I export my data?");
Gleap.startAgent("AGENT_ID", {
initialQuestion: "How do I export my data?",
});Set these before opening a form, and they land on whatever ticket gets created:
Gleap.setTicketAttribute("screen", "billing-settings");
Gleap.preFillForm({ subject: "Payment failed" });
Gleap.startClassicForm("bugreport");Anything you can set here is something the customer doesn't have to type and an agent doesn't have to ask for.
Gleap.on("initialized", () => {
// safe to call other Gleap methods
});
Gleap.on("open", () => {});
Gleap.on("close", () => {});
Gleap.on("checklist-completed", (data) => {});Waiting for initialized matters when your code runs early — it's the fix for calls that appear to do nothing on first load.
Gleap.setUrlHandler((url, newTab) => {
// route internally instead of a full page load
});Worth doing in a single-page app or a native shell, where the default behaviour would reload everything or open a browser on top of your app.