For #6070 Adds telemetry for enabling search suggestions in private
parent
781b141bc7
commit
c3389dcdb5
|
@ -114,7 +114,8 @@ 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,
|
||||
pref_key_sync_logins, pref_key_sync_bookmarks and pref_key_sync_history"
|
||||
pref_key_sync_logins, pref_key_sync_bookmarks, pref_key_sync_history
|
||||
and pref_key_show_search_suggestions_in_private"
|
||||
enabled:
|
||||
description: "Whether or not the preference is *now* enabled"
|
||||
bugs:
|
||||
|
@ -123,6 +124,7 @@ events:
|
|||
- https://github.com/mozilla-mobile/fenix/issues/5737
|
||||
- https://github.com/mozilla-mobile/fenix/issues/5586
|
||||
- https://github.com/mozilla-mobile/fenix/issues/6396
|
||||
- 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
|
||||
|
@ -130,6 +132,7 @@ events:
|
|||
- https://github.com/mozilla-mobile/fenix/pull/5975
|
||||
- https://github.com/mozilla-mobile/fenix/pull/6352
|
||||
- https://github.com/mozilla-mobile/fenix/pull/6601
|
||||
- https://github.com/mozilla-mobile/fenix/pull/6746
|
||||
notification_emails:
|
||||
- fenix-core@mozilla.com
|
||||
expires: "2020-03-01"
|
||||
|
@ -1654,3 +1657,16 @@ download_notification:
|
|||
notification_emails:
|
||||
- fenix-core@mozilla.com
|
||||
expires: "2020-03-01"
|
||||
|
||||
search_suggestions:
|
||||
enable_in_private:
|
||||
type: event
|
||||
description: >
|
||||
A user enabled receiving search suggestions in private sessions
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/6070
|
||||
data_reviews:
|
||||
- https://github.com/mozilla-mobile/fenix/pull/6746
|
||||
notification_emails:
|
||||
- fenix-core@mozilla.com
|
||||
expires: "2020-03-01"
|
|
@ -6,8 +6,8 @@ package org.mozilla.fenix.components.metrics
|
|||
|
||||
import android.content.Context
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.MainScope
|
||||
import mozilla.components.service.glean.BuildConfig
|
||||
import mozilla.components.service.glean.Glean
|
||||
import mozilla.components.service.glean.config.Configuration
|
||||
|
@ -36,6 +36,7 @@ import org.mozilla.fenix.GleanMetrics.QrScanner
|
|||
import org.mozilla.fenix.GleanMetrics.ReaderMode
|
||||
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.SyncAccount
|
||||
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
||||
|
@ -446,6 +447,9 @@ private val Event.wrapper: EventWrapper<*>?
|
|||
is Event.ViewLoginPassword -> EventWrapper<NoExtraKeys>(
|
||||
{ Logins.viewPasswordLogin.record(it) }
|
||||
)
|
||||
is Event.PrivateBrowsingShowSearchSuggestions -> EventWrapper<NoExtraKeys>(
|
||||
{ SearchSuggestions.enableInPrivate.record(it) }
|
||||
)
|
||||
is Event.ToolbarPositionChanged -> EventWrapper(
|
||||
{ ToolbarSettings.changedPosition.record(it) },
|
||||
{ ToolbarSettings.changedPositionKeys.valueOf(it) }
|
||||
|
|
|
@ -137,6 +137,7 @@ sealed class Event {
|
|||
object OpenOneLogin : Event()
|
||||
object CopyLogin : Event()
|
||||
object ViewLoginPassword : Event()
|
||||
object PrivateBrowsingShowSearchSuggestions : Event()
|
||||
|
||||
// Interaction events with extras
|
||||
|
||||
|
@ -153,7 +154,8 @@ sealed class Event {
|
|||
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_bookmarks),
|
||||
context.getString(R.string.pref_key_sync_history)
|
||||
context.getString(R.string.pref_key_sync_history),
|
||||
context.getString(R.string.pref_key_show_search_suggestions_in_private)
|
||||
)
|
||||
|
||||
override val extras: Map<Events.preferenceToggledKeys, String>?
|
||||
|
|
|
@ -211,6 +211,7 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
|||
inflated.visibility = View.GONE
|
||||
context?.settings()?.shouldShowSearchSuggestionsInPrivate = true
|
||||
context?.settings()?.showSearchSuggestionsInPrivateOnboardingFinished = true
|
||||
requireComponents.analytics.metrics.track(Event.PrivateBrowsingShowSearchSuggestions)
|
||||
}
|
||||
|
||||
inflated.dismiss.setOnClickListener {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue