Quickstart
Send your first event to Cohorly in a few minutes - grab your project token, fire one HTTP request, then instrument your app with an SDK.
1. Get your project token
Log in to the Cohorly dashboard and open Settings. Every app you track is a project, and each project has a UUID token that authenticates ingestion. Copy the token of the project you want to send events to - or create a new project first.
The project token only allows writing events. It is safe to ship in client-side code, like a Mixpanel token.
2. Send your first event
Every ingestion request is authed by the project token. Send it in the X-Cohorly-Token header:
curl -X POST https://api.cohorly.com/track \
-H "Content-Type: application/json" \
-H "X-Cohorly-Token: YOUR_PROJECT_TOKEN" \
-d '{
"event": "Signed Up",
"properties": { "distinct_id": "user_123", "plan": "pro" }
}'A successful call returns:
{ "status": 1, "inserted": 1 }Refresh the dashboard and the Signed Up event will appear in your project.
3. Instrument your app
For real apps, use an SDK - it handles batching, retries, anonymous ids, and identity merging for you. For a web app:
npm install @cohorly/webimport { init, track } from "@cohorly/web";
init({
apiHost: "https://api.cohorly.com",
token: "YOUR_PROJECT_TOKEN",
});
track("Signed Up", { plan: "pro" });See the SDK guides for Web, React, Next.js, React Native, and iOS.
4. Identify your users
SDKs start each visitor with an anonymous distinct_id. When the user logs in, call identify() with your real user id so pre-login and post-login activity merge into one profile:
await cohorly.identify("user_123");
cohorly.people.set({ plan: "pro", name: "Ada" });From here, explore the HTTP API if you need to send events from a backend, or the Query API to pull segmentation, funnel, and retention results into your own tools.