* Onboarding events and tracking * Rename metrics for consistency * Add reference to PR for the data review * Add default values to onboarding eventsmaster
parent
932a032772
commit
665fb8d60c
125
app/metrics.yaml
125
app/metrics.yaml
|
@ -205,6 +205,131 @@ events:
|
||||||
- fenix-core@mozilla.com
|
- fenix-core@mozilla.com
|
||||||
expires: "2020-09-01"
|
expires: "2020-09-01"
|
||||||
|
|
||||||
|
onboarding:
|
||||||
|
fxa_auto_signin:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The onboarding automatic sign in card was tapped.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
fxa_manual_signin:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The onboarding manual sign in card was tapped.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
privacy_notice:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The onboarding privacy notice card was tapped.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
pref_toggled_private_browsing:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The private browsing preference was selected from the onboarding card.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
pref_toggled_toolbar_position:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The toolbar position preference was chosen from the onboarding card.
|
||||||
|
extra_keys:
|
||||||
|
position:
|
||||||
|
description: |
|
||||||
|
A string that indicates the position of the toolbar TOP or BOTTOM.
|
||||||
|
Default: BOTTOM
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
pref_toggled_tracking_prot:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The tracking protection preference was chosen from the onboarding card.
|
||||||
|
extra_keys:
|
||||||
|
position:
|
||||||
|
description: |
|
||||||
|
A string that indicates the Tracking Protection policy STANDARD
|
||||||
|
or STRICT. Default: Toggle ON, STANDARD
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
whats_new:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The onboarding What\'s New card was tapped.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
pref_toggled_theme_picker:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The device theme was chosen using the theme picker onboarding card.
|
||||||
|
extra_keys:
|
||||||
|
theme:
|
||||||
|
description: |
|
||||||
|
A string that indicates the theme LIGHT, DARK, or FOLLOW DEVICE.
|
||||||
|
Default: FOLLOW DEVICE
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
finish:
|
||||||
|
type: event
|
||||||
|
description:
|
||||||
|
The user taps starts browsing and ends the onboarding experience.
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/10824
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/11867
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
- erichards@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
|
||||||
search_shortcuts:
|
search_shortcuts:
|
||||||
selected:
|
selected:
|
||||||
type: event
|
type: event
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.mozilla.fenix.GleanMetrics.CustomTab
|
||||||
import org.mozilla.fenix.GleanMetrics.DownloadNotification
|
import org.mozilla.fenix.GleanMetrics.DownloadNotification
|
||||||
import org.mozilla.fenix.GleanMetrics.ErrorPage
|
import org.mozilla.fenix.GleanMetrics.ErrorPage
|
||||||
import org.mozilla.fenix.GleanMetrics.Events
|
import org.mozilla.fenix.GleanMetrics.Events
|
||||||
|
import org.mozilla.fenix.GleanMetrics.Events.preferenceToggled
|
||||||
import org.mozilla.fenix.GleanMetrics.FindInPage
|
import org.mozilla.fenix.GleanMetrics.FindInPage
|
||||||
import org.mozilla.fenix.GleanMetrics.History
|
import org.mozilla.fenix.GleanMetrics.History
|
||||||
import org.mozilla.fenix.GleanMetrics.Logins
|
import org.mozilla.fenix.GleanMetrics.Logins
|
||||||
|
@ -29,6 +30,7 @@ import org.mozilla.fenix.GleanMetrics.MediaState
|
||||||
import org.mozilla.fenix.GleanMetrics.Metrics
|
import org.mozilla.fenix.GleanMetrics.Metrics
|
||||||
import org.mozilla.fenix.GleanMetrics.Pings
|
import org.mozilla.fenix.GleanMetrics.Pings
|
||||||
import org.mozilla.fenix.GleanMetrics.Pocket
|
import org.mozilla.fenix.GleanMetrics.Pocket
|
||||||
|
import org.mozilla.fenix.GleanMetrics.Onboarding
|
||||||
import org.mozilla.fenix.GleanMetrics.Preferences
|
import org.mozilla.fenix.GleanMetrics.Preferences
|
||||||
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
|
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
|
||||||
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut
|
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut
|
||||||
|
@ -552,6 +554,36 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
{ Events.tabCounterMenuAction.record(it) },
|
{ Events.tabCounterMenuAction.record(it) },
|
||||||
{ Events.tabCounterMenuActionKeys.valueOf(it) }
|
{ Events.tabCounterMenuActionKeys.valueOf(it) }
|
||||||
)
|
)
|
||||||
|
is Event.OnboardingWhatsNew -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.whatsNew.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingPrivateBrowsing -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.prefToggledPrivateBrowsing.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingPrivacyNotice -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.privacyNotice.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingManualSignIn -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.fxaManualSignin.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingAutoSignIn -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.fxaAutoSignin.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingFinish -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Onboarding.finish.record(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingTrackingProtection -> EventWrapper(
|
||||||
|
{ Onboarding.prefToggledTrackingProt.record(it) },
|
||||||
|
{ Onboarding.prefToggledTrackingProtKeys.valueOf(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingThemePicker -> EventWrapper(
|
||||||
|
{ Onboarding.prefToggledThemePicker.record(it) },
|
||||||
|
{ Onboarding.prefToggledThemePickerKeys.valueOf(it) }
|
||||||
|
)
|
||||||
|
is Event.OnboardingToolbarPosition -> EventWrapper(
|
||||||
|
{ Onboarding.prefToggledToolbarPosition.record(it) },
|
||||||
|
{ Onboarding.prefToggledToolbarPositionKeys.valueOf(it) }
|
||||||
|
)
|
||||||
|
|
||||||
// Don't record other events in Glean:
|
// Don't record other events in Glean:
|
||||||
is Event.AddBookmark -> null
|
is Event.AddBookmark -> null
|
||||||
|
|
|
@ -172,8 +172,34 @@ sealed class Event {
|
||||||
object SearchWidgetCFRCanceled : Event()
|
object SearchWidgetCFRCanceled : Event()
|
||||||
object SearchWidgetCFRNotNowPressed : Event()
|
object SearchWidgetCFRNotNowPressed : Event()
|
||||||
object SearchWidgetCFRAddWidgetPressed : Event()
|
object SearchWidgetCFRAddWidgetPressed : Event()
|
||||||
|
object OnboardingAutoSignIn : Event()
|
||||||
|
object OnboardingManualSignIn : Event()
|
||||||
|
object OnboardingPrivacyNotice : Event()
|
||||||
|
object OnboardingPrivateBrowsing : Event()
|
||||||
|
object OnboardingWhatsNew : Event()
|
||||||
|
object OnboardingFinish : Event()
|
||||||
|
|
||||||
// Interaction events with extras
|
// Interaction events with extras
|
||||||
|
data class OnboardingToolbarPosition(val position: Position) : Event() {
|
||||||
|
enum class Position { TOP, BOTTOM }
|
||||||
|
|
||||||
|
override val extras: Map<ToolbarSettings.changedPositionKeys, String>?
|
||||||
|
get() = hashMapOf(ToolbarSettings.changedPositionKeys.position to position.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
data class OnboardingTrackingProtection(val setting: Setting) : Event() {
|
||||||
|
enum class Setting { STRICT, STANDARD }
|
||||||
|
|
||||||
|
override val extras: Map<TrackingProtection.etpSettingChangedKeys, String>?
|
||||||
|
get() = hashMapOf(TrackingProtection.etpSettingChangedKeys.etpSetting to setting.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
data class OnboardingThemePicker(val theme: Theme) : Event() {
|
||||||
|
enum class Theme { LIGHT, DARK, FOLLOW_DEVICE }
|
||||||
|
|
||||||
|
override val extras: Map<AppTheme.darkThemeSelectedKeys, String>?
|
||||||
|
get() = mapOf(AppTheme.darkThemeSelectedKeys.source to theme.name)
|
||||||
|
}
|
||||||
|
|
||||||
data class PreferenceToggled(
|
data class PreferenceToggled(
|
||||||
val preferenceKey: String,
|
val preferenceKey: String,
|
||||||
|
@ -371,7 +397,7 @@ sealed class Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
data class DarkThemeSelected(val source: Source) : Event() {
|
data class DarkThemeSelected(val source: Source) : Event() {
|
||||||
enum class Source { SETTINGS, ONBOARDING }
|
enum class Source { SETTINGS }
|
||||||
|
|
||||||
override val extras: Map<AppTheme.darkThemeSelectedKeys, String>?
|
override val extras: Map<AppTheme.darkThemeSelectedKeys, String>?
|
||||||
get() = mapOf(AppTheme.darkThemeSelectedKeys.source to source.name)
|
get() = mapOf(AppTheme.darkThemeSelectedKeys.source to source.name)
|
||||||
|
|
|
@ -17,6 +17,7 @@ import mozilla.components.service.fxa.sharing.ShareableAccount
|
||||||
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.FenixSnackbar
|
import org.mozilla.fenix.components.FenixSnackbar
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
|
|
||||||
class OnboardingAutomaticSignInViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
class OnboardingAutomaticSignInViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||||
|
@ -26,6 +27,8 @@ class OnboardingAutomaticSignInViewHolder(view: View) : RecyclerView.ViewHolder(
|
||||||
|
|
||||||
init {
|
init {
|
||||||
view.turn_on_sync_button.setOnClickListener {
|
view.turn_on_sync_button.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingAutoSignIn)
|
||||||
|
|
||||||
it.turn_on_sync_button.text = it.context.getString(
|
it.turn_on_sync_button.text = it.context.getString(
|
||||||
R.string.onboarding_firefox_account_signing_in
|
R.string.onboarding_firefox_account_signing_in
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,6 +8,8 @@ import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_finish.view.*
|
import kotlinx.android.synthetic.main.onboarding_finish.view.*
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
||||||
|
|
||||||
class OnboardingFinishViewHolder(
|
class OnboardingFinishViewHolder(
|
||||||
|
@ -18,6 +20,7 @@ class OnboardingFinishViewHolder(
|
||||||
init {
|
init {
|
||||||
view.finish_button.setOnClickListener {
|
view.finish_button.setOnClickListener {
|
||||||
interactor.onStartBrowsingClicked()
|
interactor.onStartBrowsingClicked()
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingFinish)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_manual_signin.view.*
|
import kotlinx.android.synthetic.main.onboarding_manual_signin.view.*
|
||||||
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelativeWithIntrinsicBounds
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.home.HomeFragmentDirections
|
import org.mozilla.fenix.home.HomeFragmentDirections
|
||||||
|
|
||||||
class OnboardingManualSignInViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
class OnboardingManualSignInViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||||
|
@ -20,6 +22,8 @@ class OnboardingManualSignInViewHolder(view: View) : RecyclerView.ViewHolder(vie
|
||||||
|
|
||||||
init {
|
init {
|
||||||
view.turn_on_sync_button.setOnClickListener {
|
view.turn_on_sync_button.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingManualSignIn)
|
||||||
|
|
||||||
val directions = HomeFragmentDirections.actionGlobalTurnOnSync()
|
val directions = HomeFragmentDirections.actionGlobalTurnOnSync()
|
||||||
Navigation.findNavController(view).navigate(directions)
|
Navigation.findNavController(view).navigate(directions)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_privacy_notice.view.*
|
import kotlinx.android.synthetic.main.onboarding_privacy_notice.view.*
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
||||||
|
|
||||||
class OnboardingPrivacyNoticeViewHolder(
|
class OnboardingPrivacyNoticeViewHolder(
|
||||||
|
@ -22,6 +24,7 @@ class OnboardingPrivacyNoticeViewHolder(
|
||||||
view.description_text.text = view.context.getString(R.string.onboarding_privacy_notice_description, appName)
|
view.description_text.text = view.context.getString(R.string.onboarding_privacy_notice_description, appName)
|
||||||
|
|
||||||
view.read_button.setOnClickListener {
|
view.read_button.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingPrivacyNotice)
|
||||||
interactor.onReadPrivacyNoticeClicked()
|
interactor.onReadPrivacyNoticeClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,8 @@ import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_private_browsing.view.*
|
import kotlinx.android.synthetic.main.onboarding_private_browsing.view.*
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.setBounds
|
import org.mozilla.fenix.ext.setBounds
|
||||||
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
||||||
|
|
||||||
|
@ -47,6 +49,7 @@ class OnboardingPrivateBrowsingViewHolder(
|
||||||
view.description_text_once.text = text
|
view.description_text_once.text = text
|
||||||
view.description_text_once.contentDescription = String.format(text.toString(), view.header_text.text)
|
view.description_text_once.contentDescription = String.format(text.toString(), view.header_text.text)
|
||||||
view.open_settings_button.setOnClickListener {
|
view.open_settings_button.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingPrivateBrowsing)
|
||||||
interactor.onOpenSettingsClicked()
|
interactor.onOpenSettingsClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import kotlinx.android.synthetic.main.onboarding_theme_picker.view.theme_light_i
|
||||||
import kotlinx.android.synthetic.main.onboarding_theme_picker.view.theme_light_radio_button
|
import kotlinx.android.synthetic.main.onboarding_theme_picker.view.theme_light_radio_button
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.metrics.Event
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.components.metrics.Event.OnboardingThemePicker.Theme
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||||
|
@ -46,10 +47,12 @@ class OnboardingThemePickerViewHolder(view: View) : RecyclerView.ViewHolder(view
|
||||||
radioFollowDeviceTheme.addToRadioGroup(radioLightTheme)
|
radioFollowDeviceTheme.addToRadioGroup(radioLightTheme)
|
||||||
|
|
||||||
view.theme_dark_image.setOnClickListener {
|
view.theme_dark_image.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingThemePicker(Theme.DARK))
|
||||||
radioDarkTheme.performClick()
|
radioDarkTheme.performClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
view.theme_light_image.setOnClickListener {
|
view.theme_light_image.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics.track(Event.OnboardingThemePicker(Theme.LIGHT))
|
||||||
radioLightTheme.performClick()
|
radioLightTheme.performClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,23 +61,26 @@ class OnboardingThemePickerViewHolder(view: View) : RecyclerView.ViewHolder(view
|
||||||
view.clickable_region_automatic.contentDescription = "$automaticTitle $automaticSummary"
|
view.clickable_region_automatic.contentDescription = "$automaticTitle $automaticSummary"
|
||||||
|
|
||||||
view.clickable_region_automatic.setOnClickListener {
|
view.clickable_region_automatic.setOnClickListener {
|
||||||
|
it.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingThemePicker(Theme.FOLLOW_DEVICE))
|
||||||
radioFollowDeviceTheme.performClick()
|
radioFollowDeviceTheme.performClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
radioLightTheme.onClickListener {
|
radioLightTheme.onClickListener {
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingThemePicker(Theme.LIGHT))
|
||||||
setNewTheme(AppCompatDelegate.MODE_NIGHT_NO)
|
setNewTheme(AppCompatDelegate.MODE_NIGHT_NO)
|
||||||
}
|
}
|
||||||
|
|
||||||
radioDarkTheme.onClickListener {
|
radioDarkTheme.onClickListener {
|
||||||
view.context.components.analytics.metrics.track(
|
view.context.components.analytics.metrics
|
||||||
Event.DarkThemeSelected(
|
.track(Event.OnboardingThemePicker(Theme.DARK))
|
||||||
Event.DarkThemeSelected.Source.ONBOARDING
|
|
||||||
)
|
|
||||||
)
|
|
||||||
setNewTheme(AppCompatDelegate.MODE_NIGHT_YES)
|
setNewTheme(AppCompatDelegate.MODE_NIGHT_YES)
|
||||||
}
|
}
|
||||||
|
|
||||||
radioFollowDeviceTheme.onClickListener {
|
radioFollowDeviceTheme.onClickListener {
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingThemePicker(Theme.FOLLOW_DEVICE))
|
||||||
if (SDK_INT >= Build.VERSION_CODES.P) {
|
if (SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
setNewTheme(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
setNewTheme(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -11,7 +11,10 @@ import kotlinx.android.synthetic.main.onboarding_toolbar_position_picker.view.to
|
||||||
import kotlinx.android.synthetic.main.onboarding_toolbar_position_picker.view.toolbar_top_image
|
import kotlinx.android.synthetic.main.onboarding_toolbar_position_picker.view.toolbar_top_image
|
||||||
import kotlinx.android.synthetic.main.onboarding_toolbar_position_picker.view.toolbar_top_radio_button
|
import kotlinx.android.synthetic.main.onboarding_toolbar_position_picker.view.toolbar_top_radio_button
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.components.metrics.Event.OnboardingToolbarPosition.Position
|
||||||
import org.mozilla.fenix.ext.asActivity
|
import org.mozilla.fenix.ext.asActivity
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||||
|
|
||||||
|
@ -36,18 +39,28 @@ class OnboardingToolbarPositionPickerViewHolder(view: View) : RecyclerView.ViewH
|
||||||
radio.updateRadioValue(true)
|
radio.updateRadioValue(true)
|
||||||
|
|
||||||
radioBottomToolbar.onClickListener {
|
radioBottomToolbar.onClickListener {
|
||||||
|
itemView.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingToolbarPosition(Position.BOTTOM))
|
||||||
|
|
||||||
itemView.context.asActivity()?.recreate()
|
itemView.context.asActivity()?.recreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
view.toolbar_bottom_image.setOnClickListener {
|
view.toolbar_bottom_image.setOnClickListener {
|
||||||
|
itemView.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingToolbarPosition(Position.BOTTOM))
|
||||||
|
|
||||||
radioBottomToolbar.performClick()
|
radioBottomToolbar.performClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
radioTopToolbar.onClickListener {
|
radioTopToolbar.onClickListener {
|
||||||
|
itemView.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingToolbarPosition(Position.TOP))
|
||||||
itemView.context.asActivity()?.recreate()
|
itemView.context.asActivity()?.recreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
view.toolbar_top_image.setOnClickListener {
|
view.toolbar_top_image.setOnClickListener {
|
||||||
|
itemView.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingToolbarPosition(Position.TOP))
|
||||||
radioTopToolbar.performClick()
|
radioTopToolbar.performClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ import androidx.appcompat.widget.SwitchCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.*
|
import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.*
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.components.metrics.Event.OnboardingTrackingProtection.Setting
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
import org.mozilla.fenix.onboarding.OnboardingRadioButton
|
||||||
|
@ -56,11 +58,15 @@ class OnboardingTrackingProtectionViewHolder(view: View) : RecyclerView.ViewHold
|
||||||
|
|
||||||
standardTrackingProtection.onClickListener {
|
standardTrackingProtection.onClickListener {
|
||||||
updateTrackingProtectionPolicy()
|
updateTrackingProtectionPolicy()
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingTrackingProtection(Setting.STANDARD))
|
||||||
}
|
}
|
||||||
|
|
||||||
view.clickable_region_standard.apply {
|
view.clickable_region_standard.apply {
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
standardTrackingProtection.performClick()
|
standardTrackingProtection.performClick()
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingTrackingProtection(Setting.STANDARD))
|
||||||
}
|
}
|
||||||
val standardTitle = view.context.getString(
|
val standardTitle = view.context.getString(
|
||||||
R.string.onboarding_tracking_protection_standard_button_2
|
R.string.onboarding_tracking_protection_standard_button_2
|
||||||
|
@ -73,11 +79,15 @@ class OnboardingTrackingProtectionViewHolder(view: View) : RecyclerView.ViewHold
|
||||||
|
|
||||||
strictTrackingProtection.onClickListener {
|
strictTrackingProtection.onClickListener {
|
||||||
updateTrackingProtectionPolicy()
|
updateTrackingProtectionPolicy()
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingTrackingProtection(Setting.STRICT))
|
||||||
}
|
}
|
||||||
|
|
||||||
view.clickable_region_strict.apply {
|
view.clickable_region_strict.apply {
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
strictTrackingProtection.performClick()
|
strictTrackingProtection.performClick()
|
||||||
|
view.context.components.analytics.metrics
|
||||||
|
.track(Event.OnboardingTrackingProtection(Setting.STRICT))
|
||||||
}
|
}
|
||||||
val strictTitle =
|
val strictTitle =
|
||||||
view.context.getString(R.string.onboarding_tracking_protection_strict_option)
|
view.context.getString(R.string.onboarding_tracking_protection_strict_option)
|
||||||
|
|
|
@ -10,6 +10,8 @@ import android.view.View
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.onboarding_whats_new.view.*
|
import kotlinx.android.synthetic.main.onboarding_whats_new.view.*
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
|
||||||
|
|
||||||
class OnboardingWhatsNewViewHolder(
|
class OnboardingWhatsNewViewHolder(
|
||||||
|
@ -31,6 +33,7 @@ class OnboardingWhatsNewViewHolder(
|
||||||
view.get_answers.text = textWithLink
|
view.get_answers.text = textWithLink
|
||||||
view.get_answers.setOnClickListener {
|
view.get_answers.setOnClickListener {
|
||||||
interactor.onWhatsNewGetAnswersClicked()
|
interactor.onWhatsNewGetAnswersClicked()
|
||||||
|
view.context.components.analytics.metrics.track(Event.OnboardingWhatsNew)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,15 @@ The following metrics are added to the ping:
|
||||||
| media_state.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback was paused. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
| media_state.pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback was paused. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
||||||
| media_state.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media started playing. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
| media_state.play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media started playing. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
||||||
| media_state.stop |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback has ended. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
| media_state.stop |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Media playback has ended. |[1](https://github.com/mozilla-mobile/fenix/pull/6463)||2020-09-01 |
|
||||||
|
| onboarding.finish |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The user taps starts browsing and ends the onboarding experience. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
|
| onboarding.fxa_auto_signin |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The onboarding automatic sign in card was tapped. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
|
| onboarding.fxa_manual_signin |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The onboarding manual sign in card was tapped. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
|
| onboarding.pref_toggled_private_browsing |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The private browsing preference was selected from the onboarding card. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
|
| onboarding.pref_toggled_theme_picker |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The device theme was chosen using the theme picker onboarding card. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)|<ul><li>theme: A string that indicates the theme LIGHT, DARK, or FOLLOW DEVICE. Default: FOLLOW DEVICE </li></ul>|2020-09-01 |
|
||||||
|
| onboarding.pref_toggled_toolbar_position |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The toolbar position preference was chosen from the onboarding card. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)|<ul><li>position: A string that indicates the position of the toolbar TOP or BOTTOM. Default: BOTTOM </li></ul>|2020-09-01 |
|
||||||
|
| onboarding.pref_toggled_tracking_prot |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The tracking protection preference was chosen from the onboarding card. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)|<ul><li>position: A string that indicates the Tracking Protection policy STANDARD or STRICT. Default: Toggle ON, STANDARD </li></ul>|2020-09-01 |
|
||||||
|
| onboarding.privacy_notice |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The onboarding privacy notice card was tapped. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
|
| onboarding.whats_new |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The onboarding What\'s New card was tapped. |[1](https://github.com/mozilla-mobile/fenix/pull/11867)||2020-09-01 |
|
||||||
| pocket.pocket_top_site_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user clicked on the trending Pocket top site |[1](https://github.com/mozilla-mobile/fenix/pull/8098)||2020-09-01 |
|
| pocket.pocket_top_site_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user clicked on the trending Pocket top site |[1](https://github.com/mozilla-mobile/fenix/pull/8098)||2020-09-01 |
|
||||||
| pocket.pocket_top_site_removed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user removed the trending Pocket top site |[1](https://github.com/mozilla-mobile/fenix/pull/8098)||2020-09-01 |
|
| pocket.pocket_top_site_removed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user removed the trending Pocket top site |[1](https://github.com/mozilla-mobile/fenix/pull/8098)||2020-09-01 |
|
||||||
| private_browsing_mode.garbage_icon |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the garbage can icon on the private browsing home page, deleting all private tabs. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-09-01 |
|
| private_browsing_mode.garbage_icon |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the garbage can icon on the private browsing home page, deleting all private tabs. |[1](https://github.com/mozilla-mobile/fenix/pull/4968)||2020-09-01 |
|
||||||
|
|
Loading…
Reference in New Issue