diff --git a/app/metrics.yaml b/app/metrics.yaml index d4a1482dbe52..2baff9021af4 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -224,6 +224,19 @@ events: notification_emails: - fenix-core@mozilla.com expires: "2021-07-01" + default_browser_changed: + type: event + description: | + Indicates the default browser was changed + bugs: + - https://github.com/mozilla-mobile/fenix/issues/18857 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/18895 + data_sensitivity: + - interaction + notification_emails: + - fenix-core@mozilla.com + expires: "2021-10-01" set_default_browser_experiment: type: event description: | 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 a92c75d71c8c..834c5356d25a 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 @@ -203,6 +203,9 @@ private val Event.wrapper: EventWrapper<*>? is Event.SetDefaultBrowserToolbarMenuShown -> EventWrapper( { ExperimentsDefaultBrowser.menuToolbarVisible.record(it) } ) + is Event.ChangedToDefaultBrowser -> EventWrapper( + { Events.defaultBrowserChanged.record(it) } + ) is Event.OpenedBookmark -> EventWrapper( { BookmarksManagement.open.record(it) } ) @@ -830,7 +833,6 @@ private val Event.wrapper: EventWrapper<*>? is Event.FennecToFenixMigrated -> null is Event.AddonInstalled -> null is Event.SearchWidgetInstalled -> null - is Event.ChangedToDefaultBrowser -> null is Event.SyncAuthFromSharedReuse, Event.SyncAuthFromSharedCopy -> null } diff --git a/docs/metrics.md b/docs/metrics.md index 041e469cdce1..a234e44a3e3f 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -133,6 +133,7 @@ In addition to those built-in metrics, the following metrics are added to the pi | events.app_received_intent |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The system received an Intent for the HomeActivity. An intent is received an external entity wants to the app to display content. Intents can be received when the app is closed – at which point the app will be opened – or when the app is already opened – at which point the already open app will make changes such as loading a url. This can be used loosely as a heuristic for when the user requested to open the app. The HomeActivity encompasses the home screen and browser screen but may include other screens. This differs from the app_opened probe because it measures all startups, not just cold startup. |[mozilla-mobile/fenix#11940/](https://github.com/mozilla-mobile/fenix/pull/11940/), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|
  • source: The method used to open Fenix. Possible values are `app_icon`, `custom_tab`, `link` or `unknown`
|2021-06-01 | | | events.browser_menu_action |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A browser menu item was tapped |[mozilla-mobile/fenix#1214](https://github.com/mozilla-mobile/fenix/pull/1214#issue-264756708), [mozilla-mobile/fenix#5098](https://github.com/mozilla-mobile/fenix/pull/5098#issuecomment-529658996), [mozilla-mobile/fenix#6310](https://github.com/mozilla-mobile/fenix/pull/6310), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)|
  • item: A string containing the name of the item the user tapped. These items include: Settings, Help, Desktop Site toggle on/off, Find in Page, New Tab, Private Tab, Share, Report Site Issue, Back/Forward button, Reload Button, Quit, Reader Mode On, Reader Mode Off, Open In app, Add To Top Sites, Add-ons Manager, Bookmarks, History, Set Default Browser
|2021-07-01 |2 | | events.copy_url_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |An event that indicates that a user has selected copy option when long pressing on url bar. |[mozilla-mobile/fenix#16915](https://github.com/mozilla-mobile/fenix/pull/16915)||2021-05-10 |2 | +| events.default_browser_changed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Indicates the default browser was changed |[mozilla-mobile/fenix#18895](https://github.com/mozilla-mobile/fenix/pull/18895)||2021-10-01 |2 | | events.entered_url |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user entered a url |[mozilla-mobile/fenix#1067](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)|
  • autocomplete: A boolean that tells us whether the URL was autofilled by an Autocomplete suggestion
|2021-07-01 |2 | | events.opened_link |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened a link with Fenix |[mozilla-mobile/fenix#5975](https://github.com/mozilla-mobile/fenix/pull/5975), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)|
  • mode: The mode the link was opened in. Either 'PRIVATE' or 'NORMAL'. N.B.: this probe may be incorrectly implemented: see https://github.com/mozilla-mobile/fenix/issues/14133
|2021-07-01 |2 | | events.performed_search |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user performed a search |[mozilla-mobile/fenix#1067](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [mozilla-mobile/fenix#1677](https://github.com/mozilla-mobile/fenix/pull/1677), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)|
  • source: A string that tells us how the user performed the search. Possible values are: * default.action * default.suggestion * shortcut.action * shortcut.suggestion
|2021-07-01 |2 |