Installation
Usage
Import the GleapAdmin package.Initialize the SDK
It is required to initialize the GleapAdmin SDK before sending events or other requests.Identify a user
company.id
is required inside the optional company object; company.name never
overwrites a name set via updateCompany.
Companies
Set authoritative company attributes (plan, value, SLA, address, custom data) from your backend. These are shown in the dashboard, used for company-level SLAs and revenue-based prioritization, and are never overwritten by data sent from your client apps.Pipelines (CRM)
Manage CRM pipeline entries from your backend: put a company or contact on a pipeline, move it through stages, set field values, or remove it — for example to mirror your signup or billing lifecycle onto an onboarding pipeline. Entries are addressed by your own identifiers: thecompanyId you pass to
updateCompany for company pipelines, or the userId you pass to identify
for contact pipelines. Pipeline, stage and field ids come from getPipelines:
400 naming the valid ids.
Track MRR (customer value)
Gleap uses thevalue field as a customer’s MRR: monthly recurring
revenue, in your billing currency, in major units (for example 499 or
49.9, not cents). Kai PM scores a company account with the maximum of the
company value and its members’ contact values, counted once per company —
so for team accounts, setting the company value is enough.
Update it from your billing webhook so Gleap always mirrors your billing
system:
identify and updateCompany send immediately — safe in short-lived webhook
handlers. trackEvent is buffered (flushed every 2.5 seconds), so only use
it from long-running processes.
Track an event
Rate limit
Please note that the identify and track APIs enforce a rate limit of 1500 requests / 60 seconds per API token. If you exceed the limit, requests are rejected with429 Too Many Requests and the token is blocked for a short period before requests are accepted again.