
Getting started
Quickstart
Install the SDK
Pulse's Track API is language-agnostic. You can call it from a browser, mobile app, or backend service. The examples below use fetch, but any HTTP client works.
Step 1 — Get an API key
Go to Integrations → API keys → + New key. Give the key a descriptive name and select the scopes you need.
track:write— send events and identify calls.track:read— read back events (for diagnostics).customers:read/customers:write— read / upsert customer profiles.events:read— pull event streams.campaigns:read— list campaigns and their stats.
Keys are shown once. Copy yours to a secrets manager immediately. You can revoke (not recover) a key at any time.
Step 2 — Track an event
await fetch(
'https://zruqflqnlzriyowvhcdy.supabase.co/functions/v1/track',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${'$'}{PULSE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
external_id: 'user_123',
name: 'item_added_to_cart',
properties: { sku: 'SKU-42', price: 29.00, currency: 'USD' },
context: { ip: '203.0.113.12', ua: navigator.userAgent }
}),
}
)Step 3 — Identify a customer
Send an identify call whenever you learn new traits about a user (on signup, on subscription change, etc.).
await fetch(
'https://zruqflqnlzriyowvhcdy.supabase.co/functions/v1/track',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${'$'}{PULSE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'identify',
external_id: 'user_123',
email: 'sara@example.com',
first_name: 'Sara',
attributes: {
plan: 'premium',
signup_source: 'referral',
wallet_balance_ngn: 125000
}
}),
}
)Step 4 — Verify in the UI
Open Events in the Pulse sidebar. You should see your event arrive within a few seconds. If it doesn't, check:
- The API key has
track:writescope and is not revoked. - The request returns HTTP 200. A 401 means the key is wrong; a 403 means the scope is missing.
- The
external_idmatches a customer you'd expect (or a new customer is auto-created on first write).
Best practices
- Use consistent event names.
item_added_to_carteverywhere, not three variants. - Put who in
external_id, what inname, and details inproperties. - Fire events server-side when they involve money or trust. Browser events can be blocked or spoofed.
- Keep
propertiesflat and under 32 keys; arrays and nested objects are allowed but harder to segment on.