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

Commit

Permalink
For #6070 Adds telemetry for enabling search suggestions in private
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare committed Nov 22, 2019
1 parent 9869408 commit e402d09
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,22 @@ events:
description: "The preference key for the boolean (true/false) preference the user toggled. We currently track:
show_search_suggestions, remote_debugging, telemetry, tracking_protection, search_bookmarks,
search_browsing_history, show_clipboard_suggestions, show_search_shortcuts, open_links_in_a_private_tab,
and pref_key_sync_logins"
pref_key_sync_logins and pref_key_show_search_suggestions_in_private"
enabled:
description: "Whether or not the preference is *now* enabled"
bugs:
- https://github.com/mozilla-mobile/fenix/issue/975
- https://github.com/mozilla-mobile/fenix/issue/5094
- https://github.com/mozilla-mobile/fenix/issues/5737
- https://github.com/mozilla-mobile/fenix/issues/5586
- https://github.com/mozilla-mobile/fenix/issues/6070
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1896
- https://github.com/mozilla-mobile/fenix/pull/5704
- https://github.com/mozilla-mobile/fenix/pull/5886
- https://github.com/mozilla-mobile/fenix/pull/5975
- https://github.com/mozilla-mobile/fenix/pull/6352
- https://github.com/mozilla-mobile/fenix/pull/6746
notification_emails:
- fenix-core@mozilla.com
expires: "2020-03-01"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ private val Event.wrapper: EventWrapper<*>?
is Event.ViewLoginPassword -> EventWrapper<NoExtraKeys>(
{ Logins.viewPasswordLogin.record(it) }
)
Event.PrivateBrowsingShowSearchSuggestions -> TODO()
// Don't record other events in Glean:
is Event.AddBookmark -> null
is Event.OpenedBookmark -> null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ sealed class Event {
object OpenOneLogin : Event()
object CopyLogin : Event()
object ViewLoginPassword : Event()
object PrivateBrowsingShowSearchSuggestions : Event()

// Interaction events with extras

Expand All @@ -150,7 +151,8 @@ sealed class Event {
context.getString(R.string.pref_key_show_clipboard_suggestions),
context.getString(R.string.pref_key_show_search_shortcuts),
context.getString(R.string.pref_key_open_links_in_a_private_tab),
context.getString(R.string.pref_key_sync_logins)
context.getString(R.string.pref_key_sync_logins),
context.getString(R.string.pref_key_show_search_suggestions_in_private)
)

override val extras: Map<Events.preferenceToggledKeys, String>?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class SearchFragment : Fragment(), BackHandler {
inflated.visibility = View.GONE
context?.settings()?.shouldShowSearchSuggestionsInPrivate = true
context?.settings()?.showSearchSuggestionsInPrivateOnboardingFinished = true
context?.components?.analytics?.metrics?.track(Event.PrivateBrowsingShowSearchSuggestions)
}

inflated.dismiss.setOnClickListener {
Expand Down

0 comments on commit e402d09

Please sign in to comment.