diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 0dcce98bf3..709a7b9ffc 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -721,15 +721,16 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) { linking={LINKING} theme={theme} onStateChange={() => { - const routeName = getCurrentRouteName() - if (routeName === 'Notifications') { - logEvent('router:navigate:notifications', {}) - } + logEvent('lake:router:navigate', { + from: prevLoggedRouteName.current, + }) + prevLoggedRouteName.current = getCurrentRouteName() }} onReady={() => { attachRouteToLogEvents(getCurrentRouteName) logModuleInitTime() onReady() + logEvent('lake:router:navigate', {}) }}> {children} diff --git a/src/lib/statsig/events.ts b/src/lib/statsig/events.ts index 2014f31f53..9a45a620e0 100644 --- a/src/lib/statsig/events.ts +++ b/src/lib/statsig/events.ts @@ -30,7 +30,9 @@ export type LogEvents = { secondsActive: number } 'state:foreground': {} - 'router:navigate:notifications': {} + 'lake:router:navigate': { + from?: string + } 'deepLink:referrerReceived': { to: string referrer: string