An index of the JavaScript SDK, grouped by what you're trying to do. Signatures, arguments and per-platform equivalents live in the developer docs. This page is here so you know which method to look up.
The mobile and cross-platform SDKs cover most of the same ground under their own naming. Product tours, startAgent, the AI chatbar, setUrlHandler and setEnvironment are web only.
Method | What it's for |
|---|---|
| Start the SDK with your Project ID, or remove it again. |
| Point the SDK at the US hosts, for projects in the US region. Call it before |
| Mark reports as dev, staging or prod. |
| Attach your app's version to every report. |
| Override single hosts, for example behind your own proxy. |
| Hand the SDK your Content Security Policy nonce. |
Method | What it's for |
|---|---|
| Tell Gleap who the user is when they log in, or update their details later. |
| Forget the user on logout. |
| Check who Gleap thinks the user is. |
| Set the messenger's language from your app's own setting. |
Method | What it's for |
|---|---|
| Attach data that describes the person or the situation to their reports. |
| Take some or all of it away again. |
| Record what the person did. |
Method | What it's for |
|---|---|
| Open or close the messenger, or hide the launcher and use your own button. |
| Go straight to the inbox, one conversation, or a new one. |
| Open the help center, one article or collection, or a search. |
| Open news, the roadmap or checklists. |
Method | What it's for |
|---|---|
| Start a conversation workflow. |
| Open an AI agent, or ask Kai a question directly. |
| Open a form, with fields already filled in if you like. |
| Start a tour, a checklist or a survey when your app decides. |
Method | What it's for |
|---|---|
| Control the AI chatbar. |
| Let an AI agent call a function in your frontend and use the result in its answer. |
| Drive an embedded agent conversation from your code. |
Method | What it's for |
|---|---|
| Add your own console entries, or stop the SDK capturing the console. |
| Keep endpoints, tokens and personal data out of captured requests. |
| Change how many requests are kept, or attach your own. |
| Mask inputs and elements in replays. |
| Leave fields out of the environment data, or turn it off. |
| File a crash report without showing the user anything. |
Method | What it's for |
|---|---|
| Listen for events such as |
| Run your own code when a workflow or button triggers a custom action. |
| Open links yourself, for example inside a single-page or native app. |
on is a listener or delegate. Look for the Callbacks page of your platform in the developer docs.Method | What it's for |
|---|---|
| Pre-fill fields on the ticket that gets created, such as which screen they were on. |
| Add tags to every ticket the user creates. |
Method | What it's for |
|---|---|
| Set colours, or switch the messenger between light and dark. |
| Decide how the session is stored and whether page views are tracked. |
| Control notifications and sounds. |
| Turn on keyboard shortcuts. |
| Close info cards and banners, or load them from your own host. |
Most of these have a dashboard equivalent. The code versions exist for values that only exist at runtime, such as a theme the user picked or a language your app already knows.