From c8be9b78c6abb1ca98a2e4c9342e314b19d2cb7c Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Sat, 7 Sep 2024 04:13:51 -0700
Subject: [Statsig] Add more events to downsample, increase downsample rate
 (#5198)

* add some events for sampling

* include downsample rate in metadata

* fix metadata logic

* uncomment debug
---
 src/Navigation.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/Navigation.tsx')

diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 0bf0e9f93..2beba4f9d 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -661,16 +661,15 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) {
       linking={LINKING}
       theme={theme}
       onStateChange={() => {
-        logEvent('router:navigate:sampled', {
-          from: prevLoggedRouteName.current,
-        })
-        prevLoggedRouteName.current = getCurrentRouteName()
+        const routeName = getCurrentRouteName()
+        if (routeName === 'Notifications') {
+          logEvent('router:navigate:notifications:sampled', {})
+        }
       }}
       onReady={() => {
         attachRouteToLogEvents(getCurrentRouteName)
         logModuleInitTime()
         onReady()
-        logEvent('router:navigate:sampled', {})
       }}>
       {children}
     </NavigationContainer>
-- 
cgit 1.4.1

