Any backend
Send events from Express, Hono, Fastify, Remix, workers, or a backend in any language.
The Next.js middleware captures every signed-in request for you. On any other backend you send events yourself, from the places where your code already knows the customer account. Nothing about your auth or routing has to change.
Pick 3–5 actions
Choose places where a customer account does something meaningful: creates a
resource, completes a core action, invites a teammate. Not every route,
not health checks. Use short, stable names like feature.report.generated.
accountId is the customer you bill (team, organization or company; the user
itself in a B2C app). Take it from your verified server session, never from a
value the client sends. Without an account, no event is sent.
Node.js: track()
Works in any Node 18+ runtime: Express, Hono, Fastify, Remix, NestJS, queue
workers. Requires atune 0.1.3 or later.
npm install atuneATUNE_API_KEY=<YOUR_API_KEY>ATUNE_URL=https://test.useatune.comSign in to find your API key in Settings.
ATUNE_URL is the bare host. The SDK adds /api/v1/... itself.
import { track } from "atune";
// Where your code already knows the customer account (team, org or company)
// and the signed-in user. Don't await it: tracking never delays the response.
void track("feature.report.generated", {
accountId: session.orgId,
userId: session.userId,
properties: { reportType: "activation" },
});track() never throws and gives up after one second, so a slow or down Atune
can never break your app. It also accepts a subscription
(stage, plan, seats, mrr, currency, trialEndsAt), see
Trial, paying and subscription value.
Any language: the HTTP API
Python, Ruby, Go, PHP, Java: send one POST from your server per action.
POST https://test.useatune.com/api/v1/eventsAuthorization: Bearer <YOUR_API_KEY>Content-Type: application/json{"accountId": "acme","userId": "user_123","event": "feature.report.generated","properties": { "reportType": "activation" }}Sign in to find your API key in Settings.
Use a short timeout (about one second), don't wait for the response before answering your user, and never let a failure reach them. See the events API for every field.
Each workspace may send 2,000 events per 10 seconds by default, and separately
2,000 identify/group writes (counted as accounts and users touched). Above that, Atune answers 429 with Retry-After: 10 and a
detail explaining the limit; nothing from that request is stored, so it is
safe to retry after the wait. The limit is soft under parallel bursts:
requests sent at the same moment can each pass and together go over it.
Verify
Trigger one of the actions, then open Settings → Event log in Atune. The
newest event must have the name, account and user you expect. If nothing shows
up, check that ATUNE_API_KEY is set, that ATUNE_URL is the bare host, and
that you passed an accountId.