diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt index 87d10a519ac6..8c68ff9324c4 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt @@ -183,6 +183,8 @@ sealed class Event { object TabSettingsOpened : Event() + object RecentlyClosedTabsOpened : Event() + // Interaction events with extras data class TopSiteSwipeCarousel(val page: Int) : Event() { diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 82e462d7bb57..6e14b4c3ae2f 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -659,6 +659,10 @@ private val Event.wrapper: EventWrapper<*>? { ProgressiveWebApp.backgroundKeys.valueOf(it) } ) + is Event.RecentlyClosedTabsOpened -> EventWrapper( + { Events.recentlyClosedTabsOpened.record(it)} + ) + Event.MasterPasswordMigrationDisplayed -> EventWrapper( { MasterPassword.displayed.record(it) } ) diff --git a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayController.kt b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayController.kt index bb3a4f56b464..f6e4ce768410 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayController.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayController.kt @@ -250,6 +250,7 @@ class DefaultTabTrayController( override fun handleRecentlyClosedClicked() { val directions = TabTrayDialogFragmentDirections.actionGlobalRecentlyClosed() navController.navigate(directions) + metrics.track(Event.RecentlyClosedTabsOpened) } override fun handleGoToTabsSettingClicked() {