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.
typescript
window.dumbledor.track("signup", { plan: "pro" });
window.dumbledor.identify("user_123", { plan: "pro" });| 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 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.