Tracking overview
Understand how the Talivia browser tracker records page views, events, sessions, and attribution context.
Talivia's browser tracker records page views automatically and exposes a small JavaScript API for custom events, identity, and checkout attribution.
Script
<script defer src="https://talivia.com/script.js" data-website-id="YOUR_WEBSITE_ID"></script>The script reads browser context, watches client-side route changes, sends page views, and stores visitor/session keys in browser storage.
Runtime API
When the script loads, it creates window.talivia:
window.talivia.track();
window.talivia.track('signup-click');
window.talivia.identify('user_123', { email: 'founder@example.com' });
window.talivia.getSession();Collection endpoint
The tracker sends data to Talivia's collection endpoint and receives a signed cache token. That token lets Talivia keep the same visitor/session context across subsequent events without exposing private server state.
Revenue context
For checkout flows, call window.talivia.getSession() before sending a user to payment. Pass the returned visitorKey, sessionKey, or sessionId to your backend so Talivia can match payment events to the source session.