Follow the user's path through your app

Add React Native navigation breadcrumbs so people and agents can reconstruct the screens visited around an issue.

Screen-view events put logs, gestures, and screenshots in navigation context. Record stable screen names manually or connect React Navigation to preserve the user’s route through a session.

Manual Screen Views

await Ansight.screenViewed("Orders", {
  route: "/orders",
});

await Ansight.trackRoute("Checkout", {
  source: "app-router",
});

React Navigation

const navigationRef = createNavigationContainerRef();
const tracker = Ansight.createReactNavigationTracker(navigationRef);

<NavigationContainer
  ref={navigationRef}
  onReady={tracker.onReady}
  onStateChange={tracker.onStateChange}
>
  {/* screens */}
</NavigationContainer>

createReactNavigationTracker(...) records route names through screenViewed(...). Pass { recordInitial: false } to skip the initial route.