Quickstart
Send your first event in about two minutes. You need an API key from the console.
1. Install
npm install @beacon/sdk
2. Send an event
import { Beacon } from '@beacon/sdk'; const client = new Beacon({ key: process.env.BEACON_KEY }); await client.track({ name: 'signup', userId: 'u_1042' });
Requests are idempotent by
idempotency-key — retries are safe.Parameters
| Field | Type | Notes |
|---|---|---|
name | string | required, max 120 chars |
userId | string | optional |
props | object | flat key/value, max 40 keys |