Tracking an event
Event types
SDKs support several event types beyond basic tracking:track
Record a user action. This is what you’ll use most.identify
Link a device to a known user. Call this when a user logs in or signs up.group
Associate a user with a company or team.revenue
Track a purchase with structured fields.alias
Merge two user identities. Use this when you discover that two device IDs belong to the same person.context
Send device and session information. SDKs typically send this automatically.Properties
Properties are key-value pairs attached to events. They power breakdowns, filters, and custom metrics.Common patterns
Super properties
Register properties that are automatically attached to every event:track call.
Before-send hooks
Modify or drop events before they leave the SDK:Property breakdowns
Once your events have properties, you can break down any metric by any property value:- “Daily active users by
country” - “Event count broken down by
plan” - “Revenue grouped by
source”
Property aggregation
For numeric properties, you can compute aggregations:- Sum — total revenue from
purchase.amount - Average — mean order value
- Min / Max — smallest and largest values
- Count — number of events with the property set
Logs
Logs use the same pipeline but have their own fields:Severity levels
| Level | When to use |
|---|---|
emergency | System is unusable |
alert | Immediate action needed |
critical | Critical condition |
error | Error that needs attention |
warning | Something unexpected |
notice | Normal but noteworthy |
info | Informational (default) |
debug | Debug details |
trace | Very detailed tracing |
What’s next
- SDKs — language-specific integration guides
- Users & Identity — how identity resolution works
- Sessions — session tracking details
- Logs — structured logging in depth