For #18853: Add metrics for default browser new tab experiment.

upstream-sync
mcarare 3 years ago committed by Mihai Adrian Carare
parent 920c1285e4
commit dbae5dd3c0

@ -5207,3 +5207,31 @@ android_keystore_experiment:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-09-01"
set_default_newtab_experiment:
set_default_browser_clicked:
type: event
description: |
Set default browser was clicked from new tab screen.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18853
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
close_experiment_card_clicked:
type: event
description: |
Close experiment card was clicked from new tab screen.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18853
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"

@ -224,6 +224,10 @@ sealed class Event {
object SearchSuggestionClicked : Event()
object OpenedTabSuggestionClicked : Event()
// Set default browser experiment metrics
object SetDefaultBrowserClicked : Event()
object CloseExperimentCardClicked : Event()
// Home menu interaction
object HomeMenuSettingsItemClicked : Event()

@ -53,6 +53,7 @@ import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine
import org.mozilla.fenix.GleanMetrics.SearchShortcuts
import org.mozilla.fenix.GleanMetrics.SearchSuggestions
import org.mozilla.fenix.GleanMetrics.SearchWidget
import org.mozilla.fenix.GleanMetrics.SetDefaultNewtabExperiment
import org.mozilla.fenix.GleanMetrics.SyncAccount
import org.mozilla.fenix.GleanMetrics.SyncAuth
import org.mozilla.fenix.GleanMetrics.SyncedTabs
@ -814,6 +815,13 @@ private val Event.wrapper: EventWrapper<*>?
{ HomeMenu.settingsItemClicked.record(it) }
)
is Event.CloseExperimentCardClicked -> EventWrapper<NoExtraKeys>(
{ SetDefaultNewtabExperiment.closeExperimentCardClicked.record(it) }
)
is Event.SetDefaultBrowserClicked -> EventWrapper<NoExtraKeys>(
{ SetDefaultNewtabExperiment.setDefaultBrowserClicked.record(it) }
)
// Don't record other events in Glean:
is Event.AddBookmark -> null
is Event.OpenedAppFirstRun -> null

@ -567,11 +567,13 @@ class DefaultSessionControlController(
override fun handleSetDefaultBrowser() {
settings.userDismissedExperimentCard = true
metrics.track(Event.SetDefaultBrowserClicked)
activity.openSetDefaultBrowserOption()
}
override fun handleCloseExperimentCard() {
settings.userDismissedExperimentCard = true
metrics.track(Event.CloseExperimentCardClicked)
fragmentStore.dispatch(HomeFragmentAction.RemoveSetDefaultBrowserCard)
}
}

@ -206,6 +206,8 @@ In addition to those built-in metrics, the following metrics are added to the pi
| search_suggestions.enable_in_private |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user enabled receiving search suggestions in private sessions |[mozilla-mobile/fenix#6746](https://github.com/mozilla-mobile/fenix/pull/6746), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |1, 2 |
| search_widget.new_tab_button |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed anywhere from the Firefox logo until the start of the microphone icon, opening a new tab search screen. |[mozilla-mobile/fenix#4714](https://github.com/mozilla-mobile/fenix/pull/4714), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| search_widget.voice_button |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the microphone icon, opening a new voice search screen. |[mozilla-mobile/fenix#4714](https://github.com/mozilla-mobile/fenix/pull/4714), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| set_default_newtab_experiment.close_experiment_card_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Close experiment card was clicked from new tab screen. |[mozilla-mobile/fenix#18895](https://github.com/mozilla-mobile/fenix/pull/18895)||2021-10-01 |2 |
| set_default_newtab_experiment.set_default_browser_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Set default browser was clicked from new tab screen. |[mozilla-mobile/fenix#18895](https://github.com/mozilla-mobile/fenix/pull/18895)||2021-10-01 |2 |
| sync_account.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the sync account page |[mozilla-mobile/fenix#2745](https://github.com/mozilla-mobile/fenix/pull/2745#issuecomment-494918532), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| sync_account.send_tab |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user sent the current tab to another FxA device |[mozilla-mobile/fenix#5106](https://github.com/mozilla-mobile/fenix/pull/5106), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| sync_account.sign_in_to_send_tab |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the "sign in to send tab" button inside the share tab menu |[mozilla-mobile/fenix#5106](https://github.com/mozilla-mobile/fenix/pull/5106), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |

Loading…
Cancel
Save