Privacy-first analytics implementation guide
Step-by-step setup for script tag integration, event taxonomy, and anonymous session handling without cookies.
The fastest way to get useful product telemetry is also the most privacy-safe one: a single script tag and nothing else. Tracabit's tracker ships in under 2KB, uses navigator.sendBeacon for reliable delivery, and never touches cookies — so there is no consent banner, no third-party ad network, and no cross-site tracking to configure or defend.
Start by adding the script tag to your page with your project's data-key and data-project attributes. The tracker auto-fires a page_view on load, records the session via sessionStorage, and captures device type, referrer, and screen attributes as anonymous signals. Because session persistence lives in sessionStorage with an in-memory fallback, a visitor's identity never needs to be stored server-side.
From there, extend the taxonomy with custom events. Use window.tracabit.track("signup_click", { plan: "pro" }) for one-off actions, and lean on the GA4-style helpers for the standard surface: pageView, login, purchase, and friends. Keep event names snake_case and consistent across your team; the event taxonomy guide covers naming conventions that scale.
Finally, configure per-project controls: set your allowed_origins so only your domains can send events, and use per-project API keys so every request is authenticated. That combination — zero cookies, anonymous sessions, and per-project enforcement — is the entire privacy story, and it ships in minutes, not weeks.
Tracabit records traffic, events, crashes and web vitals with one script tag, and lets your coding agent read them over MCP.
Start free