Install the package
Add the tracking component
This example uses React Router. The saved URL skips the automatic initialPageView and prevents duplicate calls for the same URL.
src/BilyTracking.tsx
useLocation() can observe committed routes.
src/App.tsx
init() calls with the same URL are safe, but keeping one component makes ownership clear. The URL guard also prevents React development checks from creating duplicate route events.
Track component actions
Calltrack() after a user action succeeds.
src/LaunchCampaignButton.tsx
Verify React tracking
Check the initial view, later routes, and action events without duplicate loading.