Track events
Capture pageviews, custom events, and user IDs from the browser tracker.
The tracker sends the first pageview on load. Call methods on window.dumbledor for custom events, user identification, and client-side route changes. Building with React or Next.js? See the SDK docs.
typescript
window.dumbledor.track("signup", { plan: "pro" });
window.dumbledor.identify("user_123", { plan: "pro" });How identify works
identify links a user ID to the current visitor session (hashed IP + user agent + daily salt — no cookies). Call it after login in the browser. Events in the same session show the linked ID, including ones sent before identify ran. Traits are accepted but not stored yet. See the SDK docs for server-side identify with matching request headers.| Field | Type | Description |
|---|---|---|
| track(name, properties?) | function | Send a custom event with optional metadata. |
| identify(userId, traits?) | function | Link a stable user ID to the current visitor session. Traits are accepted but not stored yet. |
| page() | function | Send a pageview after client-side navigation in SPAs. |
Server-side events
Send the same payloads directly to
https://ingest.dumbledor.com/v1/collect. See the API reference for the full request shape.