init() once at the top level of your app — main.tsx or App.tsx works great.
history.pushState — no router config needed.
What’s tracked automatically
Onceinit() 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