init() loads the script for you.
Install Bily
Track every route once
The browser script records the initial page and supported client-side navigation automatically. Do not add manualPageView calls for those navigations; use track() for business events.
src/bily-tracking.tsx
src/AppRoutes.tsx
react-router-dom to be installed and a router to exist above AppRoutes. Do not add another BrowserRouter, Router, or RouterProvider.
Repeated init() calls with the same URL are safe. One component keeps loader ownership clear.
Track successful actions
Calltrack() only after the user action succeeds.
src/LaunchCampaignButton.tsx
Verify React Router
Check the initial view, later routes, and action events without duplicates.
Use framework mode
Install Bily in a React Router framework mode or Remix root route.