Skip to content

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.
FieldType
track(name, properties?)function
identify(userId, traits?)function
page()function

Server-side events

Send the same payloads directly to https://ingest.dumbledor.com/v1/collect. See the API reference for the full request shape.