Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into ac-update
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 17, 2021
2 parents 51b7251 + c243991 commit ad9a246
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
27 changes: 27 additions & 0 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5813,3 +5813,30 @@ set_default_setting_experiment:
notification_emails:
- [email protected]
expires: "2021-10-01"
start_on_home:
enter_home_screen:
type: event
description: |
Know how often user lands on Homescreen upon opening the app.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/19881
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19885
data_sensitivity:
- interaction
notification_emails:
- [email protected]
expires: "2022-06-16"
open_tabs_tray:
type: event
description: |
Know how often users open the tab tray.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/19881
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19885
data_sensitivity:
- interaction
notification_emails:
- [email protected]
expires: "2022-06-16"
2 changes: 2 additions & 0 deletions app/src/main/java/org/mozilla/fenix/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
shouldNavigateBrowserFragmentOnCouldStart(savedInstanceState)
) {
navigateToBrowserOnColdStart()
} else {
components.analytics.metrics.track(Event.StartOnHomeEnterHomeScreen)
}

Performance.processIntentIfPerformanceTest(intent, this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ sealed class Event {
// Browser Toolbar
object BrowserToolbarHomeButtonClicked : Event()

// Start on Home
object StartOnHomeEnterHomeScreen : Event()
object StartOnHomeOpenTabsTray : Event()

// Interaction events with extras

data class TopSiteSwipeCarousel(val page: Int) : Event() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import org.mozilla.fenix.GleanMetrics.SearchSuggestions
import org.mozilla.fenix.GleanMetrics.SearchWidget
import org.mozilla.fenix.GleanMetrics.SetDefaultNewtabExperiment
import org.mozilla.fenix.GleanMetrics.SetDefaultSettingExperiment
import org.mozilla.fenix.GleanMetrics.StartOnHome
import org.mozilla.fenix.GleanMetrics.SyncAccount
import org.mozilla.fenix.GleanMetrics.SyncAuth
import org.mozilla.fenix.GleanMetrics.SyncedTabs
Expand Down Expand Up @@ -841,6 +842,14 @@ private val Event.wrapper: EventWrapper<*>?
{ Events.browserToolbarHomeTapped.record(it) }
)

is Event.StartOnHomeEnterHomeScreen -> EventWrapper<NoExtraKeys>(
{ StartOnHome.enterHomeScreen.record(it) }
)

is Event.StartOnHomeOpenTabsTray -> EventWrapper<NoExtraKeys>(
{ StartOnHome.openTabsTray.record(it) }
)

// Don't record other events in Glean:
is Event.AddBookmark -> null
is Event.OpenedAppFirstRun -> null
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class HomeFragment : Fragment() {
}

view.tab_button.setOnClickListener {
requireComponents.analytics.metrics.track(Event.StartOnHomeOpenTabsTray)
openTabsTray()
}

Expand Down

0 comments on commit ad9a246

Please sign in to comment.