How Tracking Works
Understand how Atribu records visitor activity on your website
How Tracking Works
When someone visits your website, Atribu's tracker records what they do — which pages they view, where they came from, and how they interact with your site. This data powers your dashboard, attribution reports, and revenue insights.
Two IDs, two concepts
Atribu uses two identifiers to understand your traffic. Both are generated automatically -- no setup required.
Visitor ID (anonymous_id)
Think of this as a fingerprint for each device. The same person visiting your site from the same browser and device will always be recognized as the same visitor. This ID is stored in the browser for 1 year, so returning visitors are counted accurately.
- Stored in
localStorageasatribu_anon_id - Also written as a first-party cookie (
atribu_visitor_id) so server-side code can read it - One per device/browser combination -- if someone visits from their phone and their laptop, that counts as two visitors
Session ID
A session represents a single visit. It starts when someone arrives on your site and ends after 30 minutes of inactivity. If they come back an hour later, that is a new session (a new visit), but the same visitor.
- Stored in
localStorageasatribu_session_id - Also written as a cookie (
atribu_session_id) with a 30-minute expiry - A new session also starts when the marketing source changes (e.g., a visitor clicks a different ad)
Visitors vs. sessions
Your dashboard shows both metrics. Visitors tells you how many unique people came to your site. Sessions tells you how many total visits happened. One visitor can have many sessions.
What gets captured on every page view
Each time a visitor loads a page, Atribu records:
| Data point | Example |
|---|---|
| Page URL | /pricing, /blog/how-to-run-ads |
| Referrer | google.com, facebook.com, direct |
| UTM parameters | utm_source=facebook, utm_medium=paid |
| Click IDs | fbclid, gclid, msclkid, ttclid |
| Device type | Desktop, mobile, tablet |
| Browser | Chrome, Safari, Firefox |
| Country | Based on IP address |
How sessions work
Visitor arrives
When someone lands on your site, the tracker checks if an active session exists. If the last activity was more than 30 minutes ago (or no session exists), a new session starts.
Activity is tracked
Every page view, form submission, and custom event updates the session's "last seen" timestamp. As long as the visitor keeps interacting within 30-minute windows, it all counts as one session.
Session ends
After 30 minutes of inactivity (no page views, no clicks, no events), the session expires. If the visitor returns after that, a new session begins.
Configuring the session timeout
The default timeout is 30 minutes, which works well for most websites. If you need a different value, you can configure it in your tracking snippet:
window.ATRIBU_SESSION_TIMEOUT_MINUTES = 15;Valid range: 1 to 120 minutes.
Source-change detection
By default, a new session starts only after inactivity. You can also start a new session when the marketing source changes -- for example, if a visitor clicks a Google ad, then clicks a Facebook ad 10 minutes later:
window.ATRIBU_SESSION_MODE = "inactivity_or_source_change";Cookies explained
Atribu writes two first-party cookies on your domain:
| Cookie | Lifetime | Purpose |
|---|---|---|
atribu_visitor_id | 1 year | Stores the visitor's anonymous ID so server-side code (like checkout flows) can read it and pass it to payment providers |
atribu_session_id | 30 minutes | Stores the current session ID for the same reason |
These cookies are first-party (set on your own domain), SameSite=Lax, and contain only random identifiers -- no personal data.
Privacy by default
Atribu does not collect any personal information until a visitor voluntarily identifies themselves (by filling out a form, booking an appointment, etc.). Until that point, visitors are completely anonymous -- Atribu only knows that "someone on this device" viewed certain pages. Learn how this anonymous-to-known transition works in Identity Resolution.
Next steps
Auto-Capture
How Atribu automatically detects form submissions, bookings, and payments
Identify Users
Connect anonymous visitors to real people for full attribution
UTM Parameters
Tag your traffic sources for accurate channel classification
Custom Domain
Bypass ad blockers by routing tracking through your own domain