Skip to content

Quickstart

This guide shows how to send your first analytics event directly to the devgrowthlab API.
There’s no SDK or tracking script - just one simple HTTPS POST request.

Each day the user opens your app or website, send an event to the devgrowthlab service. You don’t need to send more than one event a day.

In your dashboard, go to Settings → Integration and copy your endpoint and API token (it should start with ey...).

Your endpoint will look like https://a556fb1-b21....devgrowthlabprojects.com/ingest

Your API key will start with ey..., we’ll use this in the Authorization header as Bearer ey....

The ingestion page of the dashboard

Request body:

{
"watermark": "string or \"none\"",
"cohorts": {
"Example Cohort": "Example Value"
}
}
  • watermark: required. Pass the watermark returned by the previous request, or "none" the first time you call the service.
  • cohorts: a simple map of strings to strings - you can use it to group users by plan, referrer, or experiment.
    We’ll cover advanced cohorting later in the Guides section.

Response:

{
"nextWatermark": "string"
}

You must store this new nextWatermark securely and include it as watermark in the next request. A watermark marks how far processing has got. It records what devgrowthlab has already recorded in previous API calls, so the next request only adds what’s new, and the service doesn’t duplicate records or count the user as a fresh install on every app open. It isn’t an identifier and doesn’t identify the user.

Choose your preferred framework below and copy the example into your project.

const response = await fetch("https://<projectid>.devgrowthlabprojects.com/ingest", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_JWT_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
watermark: localStorage.getItem("devgrowthlab_watermark") || "none",
cohorts: {
// See the guide on cohorts for more info
"Example Cohort": "Example Value"
}
})
});
const data = await response.json();
if (data.nextWatermark) {
// ⚠️ Store the new watermark securely
// Note: it's best to store this in your own backend for the user, unless you have consent for cookies and local storage.
localStorage.setItem("devgrowthlab_watermark", data.nextWatermark);
}

Go back to your dashboard, under Settings → Integration last ingestion should now list the current date. It may take a few moments to process.

If you have an existing app with a large cohort of existing users then it’s recommended to send additional information to the service at first so the devgrowthlab can accurately model the retention curve for your app. Follow the guide here.