Follow the user's path through your app
Give Cordova/Capacitor session evidence navigation context with named screen visits and route changes.
Navigation breadcrumbs help you reconstruct the path to a problem. Record screen views directly or track History API changes so session review includes which screens the user visited.
Record a view manually:
await Ansight.screenViewed("Order details", { orderId: "123" });
Track browser history and hash changes:
const routeTracker = Ansight.createRouteTracker({
resolveName: (url) => url.pathname + url.hash,
});
// Later:
routeTracker.remove();
The tracker observes pushState, replaceState, popstate, and hashchange by default. Use an app-specific resolveName to avoid recording sensitive query values.