Skip to main content
React
Add init() once at the top level of your app — main.tsx or App.tsx works great.
That’s it. Tracelit handles SPA route changes automatically via history.pushState — no router config needed.
Always set environment. Only "production" and "development" are accepted. If omitted, events default to development.
Using authentication? Call identify() after login to link sessions to real users. See Identify users.

What’s tracked automatically

Once init() runs, all of this starts working with zero extra code:
  • Page views (including client-side route changes)
  • Clicks, rage clicks, and scroll depth
  • Session replay
  • JavaScript and API errors
  • Performance metrics (LCP, FCP, TTFB)
  • Live visitor count

LLM Prompt

Paste this into your coding assistant to install Tracelit for you:

What’s next?