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

FieldTypeNotes
namestringrequired, max 120 chars
userIdstringoptional
propsobjectflat key/value, max 40 keys