Bug 1869664 - Add more toolbar telemetry

fenix/123.0
mike a 5 months ago committed by mergify[bot]
parent 73126aa2e4
commit 9d659af75d

@ -135,10 +135,10 @@ events:
description: |
A string containing the name of the item the user tapped. These items
include:
add_to_homescreen, add_to_top_sites, addons_manager, back, bookmark,
bookmarks, desktop_view_off, desktop_view_on, downloads,
find_in_page, forward, history, new_tab, open_in_app, open_in_fenix,
quit, reader_mode_appearance, reload, remove_from_top_sites,
add_to_homescreen, add_to_top_sites, addons_manager, back, back_long_press,
bookmark, bookmarks, desktop_view_off, desktop_view_on, downloads,
find_in_page, forward, forward_long_press, history, new_tab, open_in_app,
open_in_fenix, quit, reader_mode_appearance, reload, remove_from_top_sites,
save_to_collection, set_default_browser, settings, share, stop,
sync_account, translate and print_content.
type: string
@ -475,6 +475,23 @@ events:
notification_emails:
- android-probes@mozilla.com
expires: never
browser_toolbar_security_indicator_tapped:
type: event
description: |
An event that indicates that a user has tapped
the security indicator icon (at the start of the domain name).
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1869664
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/5019#issuecomment-1876329933
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Toolbar
browser_toolbar_erase_tapped:
type: event
description: |
@ -489,6 +506,22 @@ events:
notification_emails:
- android-probes@mozilla.com
expires: never
browser_toolbar_input_cleared:
type: event
description: |
A user pressed the circle cross icon, clearing the input in the toolbar.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1869664
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/5019#issuecomment-1876329933
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Toolbar
browser_toolbar_qr_scan_tapped:
type: event
description: |
@ -506,6 +539,22 @@ events:
metadata:
tags:
- Toolbar
browser_toolbar_qr_scan_completed:
type: event
description: |
An event that indicates that a QR code has been scanned successfully.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1869664
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/5019#issuecomment-1876329933
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Toolbar
toolbar_tab_swipe:
type: event
description: |

@ -115,6 +115,7 @@ import mozilla.components.support.locale.ActivityContextWrapper
import mozilla.components.ui.widgets.withCenterAlignedButtons
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.GleanMetrics.MediaState
import org.mozilla.fenix.GleanMetrics.PullToRefreshInBrowser
import org.mozilla.fenix.HomeActivity
@ -468,6 +469,7 @@ abstract class BaseBrowserFragment :
browserToolbarView.view.display.setOnSiteSecurityClickedListener {
showQuickSettingsDialog()
Events.browserToolbarSecurityIndicatorTapped.record()
}
contextMenuFeature.set(

@ -426,7 +426,7 @@ class DefaultBrowserToolbarMenuController(
}
}
@Suppress("ComplexMethod")
@Suppress("ComplexMethod", "LongMethod")
private fun trackToolbarItemInteraction(item: ToolbarMenu.Item) {
when (item) {
is ToolbarMenu.Item.OpenInFenix ->
@ -439,10 +439,19 @@ class DefaultBrowserToolbarMenuController(
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("open_in_app"))
is ToolbarMenu.Item.CustomizeReaderView ->
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("reader_mode_appearance"))
is ToolbarMenu.Item.Back ->
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("back"))
is ToolbarMenu.Item.Back -> {
if (item.viewHistory) {
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("back_long_press"))
} else {
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("back"))
}
}
is ToolbarMenu.Item.Forward ->
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("forward"))
if (item.viewHistory) {
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("forward_long_press"))
} else {
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("forward"))
}
is ToolbarMenu.Item.Reload ->
Events.browserMenuAction.record(Events.BrowserMenuActionExtra("reload"))
is ToolbarMenu.Item.Stop ->

@ -672,6 +672,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
}.show()
}
}
Events.browserToolbarQrScanCompleted.record()
},
)
}

@ -13,6 +13,7 @@ import mozilla.components.feature.toolbar.ToolbarAutocompleteFeature
import mozilla.components.support.ktx.android.content.getColorFromAttr
import mozilla.components.support.ktx.android.content.res.resolveAttribute
import mozilla.components.support.ktx.android.view.hideKeyboard
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.R
import org.mozilla.fenix.components.Components
import org.mozilla.fenix.search.SearchEngineSource
@ -116,6 +117,10 @@ class ToolbarView(
url = text
interactor.onTextChanged(text)
}
override fun onInputCleared() {
Events.browserToolbarInputCleared.record()
}
},
)
}

@ -312,7 +312,7 @@ class DefaultBrowserToolbarMenuControllerTest {
assertNotNull(Events.browserMenuAction.testGetValue())
val snapshot = Events.browserMenuAction.testGetValue()!!
assertEquals(1, snapshot.size)
assertEquals("back", snapshot.single().extra?.getValue("item"))
assertEquals("back_long_press", snapshot.single().extra?.getValue("item"))
val directions = BrowserFragmentDirections.actionGlobalTabHistoryDialogFragment(null)
verify { navController.navigate(directions) }
@ -347,7 +347,7 @@ class DefaultBrowserToolbarMenuControllerTest {
assertNotNull(Events.browserMenuAction.testGetValue())
val snapshot = Events.browserMenuAction.testGetValue()!!
assertEquals(1, snapshot.size)
assertEquals("forward", snapshot.single().extra?.getValue("item"))
assertEquals("forward_long_press", snapshot.single().extra?.getValue("item"))
val directions = BrowserFragmentDirections.actionGlobalTabHistoryDialogFragment(null)

Loading…
Cancel
Save