Events
Every report is built from three event types:
Events from a backend and from revenue providers use the same envelope. Each event has a
message_id. Reports remove duplicates by project and message_id, so a retry does not count twice.
Visitors
A visitor is oneanonymous_id. The Web SDK creates it as a random UUID and stores it in a first-party cookie, with localStorage and memory as fallbacks. The ID lasts across days in the same browser, so a returning visitor counts once.
The ID is never derived from IP address or user agent. A cleared cookie, a private window or a second device creates a new anonymous_id.
Sessions
The SDK keeps a clientsession_id. A new session starts after 30 minutes without events. A session does not split at UTC midnight; it counts on the day of its first event.
An event without a session ID (for example a server event) joins the active session of the same visitor. If there is none, a gap of more than 30 minutes starts a new session.
- Bounce rate is the share of sessions with one page view.
- Session duration is the average active time per session.
Users and traits
A user is an explicituser_id that you send with identify(userId, traits). Use a stable ID from your own app. Email is an optional trait, not the identity key.
Traits are scalar key and value pairs (string, number, boolean or null). A later identify call updates only the keys it sends. A null value clears a key. You can also edit traits on the user’s profile page.
People and identity links
Each event that carries both ananonymous_id and a user_id links that browser to the user. Reports that follow people (retention, funnels, lifecycle, profiles and attribution) use this order:
- The explicit
user_idon the event. - Else the one user that the
anonymous_idlinks to. - Else the
anonymous_id.
Bots
The collector labels known bots and crawlers with the devicebot. The rows are kept, but every report excludes them by default. Set the filter Device: bot to see only bot traffic.