add event context

This commit is contained in:
Hailey
2024-06-10 13:02:05 -07:00
parent 179c7829a9
commit f3356bc11c
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -65,7 +65,12 @@ export type LogEvents = {
feedUrl: string feedUrl: string
feedType: string feedType: string
index: number index: number
reason: 'focus' | 'tabbar-click' | 'pager-swipe' | 'desktop-sidebar-click' reason:
| 'focus'
| 'tabbar-click'
| 'pager-swipe'
| 'desktop-sidebar-click'
| 'starter-pack-initial-feed'
} }
'feed:endReached:sampled': { 'feed:endReached:sampled': {
feedUrl: string feedUrl: string
+1 -1
View File
@@ -93,7 +93,7 @@ function HomeScreenReady({
// This is supposed to only happen on the web when you use the right nav. // This is supposed to only happen on the web when you use the right nav.
if (initialIndex !== selectedIndex) { if (initialIndex !== selectedIndex) {
lastPagerReportedIndexRef.current = initialIndex lastPagerReportedIndexRef.current = initialIndex
pagerRef.current?.setPage(initialIndex, 'desktop-sidebar-click') pagerRef.current?.setPage(initialIndex, 'starter-pack-initial-feed')
} else if (selectedIndex !== lastPagerReportedIndexRef.current) { } else if (selectedIndex !== lastPagerReportedIndexRef.current) {
lastPagerReportedIndexRef.current = selectedIndex lastPagerReportedIndexRef.current = selectedIndex
pagerRef.current?.setPage(selectedIndex, 'desktop-sidebar-click') pagerRef.current?.setPage(selectedIndex, 'desktop-sidebar-click')