Getting started
From zero to your first tracked event in four steps.
1. Create your account
Sign up for free with email + password. Free plan is 10K events/month, 1 site, no credit card.
2. Add your first app
After signing up, go to your dashboard:
- Click Apps → New app.
- Give your site a name (e.g. "Marketing site"), set its timezone, and add allowed origins (e.g.
https://yourdomain.com). - Copy the
site_key— you'll need it in the next step.
3. Install the SDK
Easiest option: paste this in your site's <head>, before </body>:
<script src="https://cdn.jsdelivr.net/npm/@racoelho/analytics@0.2/dist/index.global.js"></script>
<script>window.analytics = new Analytics.Analytics({ siteKey: 'YOUR_SITE_KEY' })</script>Or use npm — see the install guide and the step-by-step guides for Next.js, React, Vue, WordPress, Shopify and more.
4. Watch events arrive
Deploy your site, browse a couple of pages, then check the dashboard. First events should appear within ~30 seconds. If nothing shows up after 1 minute:
- Confirm your
site_keymatches. - Confirm your domain is in the app's Allowed origins list (CORS).
- Open browser devtools → Network tab → filter "i" → look for a POST to our ingestion endpoint returning 200.
5. Track custom events (optional)
Pageviews come automatically. To track custom events (signups, purchases, etc.):
// Browser
window.analytics?.track('signup', { plan: 'free' })
// or with the npm SDK
import { Analytics } from '@racoelho/analytics'
const a = new Analytics({ siteKey: 'YOUR_SITE_KEY' })
a.purchase('order_123', 9900, 'USD')