EventLoomDocumentation

Web SDK · v0.2.0

Connect EventLoom

Send product behavior, identity, page context, errors, and Web Vitals through one browser client. The first verified event should take less than ten minutes.

Web SDK availableiOS and Android planned

01

Quickstart

Create a Web source under Data sources, copy the write key when it appears, then install the package.

pnpm add @event-loom/web
import { createEventLoom } from "@event-loom/web";

export const analytics = createEventLoom({
  writeKey: "el_live_...",
  autoCapture: {
    pageViews: true,
    errors: true,
    performance: true,
  },
});

A write key can only submit events. Use separate sources and keys for production, staging, and development.

02

Track product events

Name events with lowercase verbs and underscores. Names must match ^[a-z][a-z0-9_]*$.

analytics.track("checkout_started", {
  plan: "basic",
  value: 60,
  annual: false,
});

Properties support strings, numbers, booleans, null, and arrays of those values. Avoid large objects and sensitive information.

03

Identify users

Call identify when a stable application user ID is available. Reset identity immediately after sign-out.

analytics.identify("user_123", {
  country: "US",
  plan: "pro",
});

// On sign-out
analytics.reset();

04

Automatic capture

Automatic collection is off by default. Page capture observes initial load and SPA navigation. Click capture only reads elements you explicitly mark and never reads input values.

<button
  data-eventloom-event="signup_clicked"
  data-eventloom-properties='{"location":"hero"}'
>
  Sign up
</button>

Use analytics.page() for manual page events andanalytics.screen() for screen-like flows.

05

Report handled errors

Uncaught errors can be collected automatically. Add business context when you catch a failure yourself.

try {
  await submitOrder();
} catch (error) {
  analytics.error("checkout_failed", error, {
    step: "payment",
  });
}

07

Configuration

createEventLoom({
  writeKey: "el_live_...",
  endpoint: "https://ingest.geteventloom.com/v1/events",
  flushAt: 20,
  flushIntervalMs: 10_000,
  maxRetries: 2,
  debug: true,
});
flushAt1–100 events20
flushIntervalMsMinimum 1 second10,000
maxRetries0–5 attempts2
debugConsole diagnosticsfalse

08

Verify delivery

Send one named event and flush it immediately.

analytics.track("integration_verified");
await analytics.flush();
  1. 1Open EventLoom Data sources.
  2. 2Confirm the source changes from Waiting to Receiving.
  3. 3Confirm integration_verified appears in Events.
  4. 4Disable debug mode before production release.