Skip to content

Quickstart

Send your first event and watch a dashboard build itself. Start to finish, this takes about five minutes — no schema design, no data team on call.

~5 min · no card required

1. Install the SDK

Add the Atlas client to your app. It is a single dependency with no peer requirements and works in the browser or on the server.

terminal
npm install @atlas/analytics
# or
pnpm add @atlas/analytics

2. Initialize the client

Initialize once, near the top of your app. Atlas batches events and flushes them automatically, so you never block a render to send data.

lib/analytics.ts
import { Atlas } from '@atlas/analytics';

export const atlas = new Atlas({
  writeKey: process.env.NEXT_PUBLIC_ATLAS_KEY!,
  // events flush every 10s, or when the queue hits 20
  flushInterval: 10_000,
});

3. Track your first event

Call track with an event name and any properties you want to break down by later. Properties are schemaless — send what you have, refine as you learn.

checkout.ts
atlas.track('Order Completed', {
  plan: 'growth',
  revenue: 49,
  seats: 10,
});

Within a few seconds the event appears in your live stream, and Atlas drafts a starter dashboard from the properties it sees — trend, breakdown, and a plain-English read-out included.

4. Ask your first question

Skip the query builder entirely — open Ask and type the question the way you would say it out loud.

ask
> Order Completed by plan, last 7 days

✓ parsed → metric: count('Order Completed')
✓ grouped by plan · window 7d
✓ 84,201 events scanned in 1.2s

That is the whole loop: instrument, track, ask. Everything else in Atlas — funnels, retention, alerts — builds on these same events.