1
0
Fork 0

Add 'useEmail' and 'useEmailProblem' metrics event

Fixes #9834
master
Vlad Filippov 2020-04-09 16:20:59 -04:00 committed by Emily Kager
parent b3248ec769
commit e51e1c878b
6 changed files with 35 additions and 0 deletions

View File

@ -841,6 +841,28 @@ sync_auth:
notification_emails:
- fenix-core@mozilla.com
expires: "2020-09-01"
use_email:
type: event
description: >
A user chose to use their email to sign in instead of scanning a QR code, counterpart to "scan_pairing"
bugs:
- https://github.com/mozilla-mobile/fenix/issues/9834
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/9835#pullrequestreview-398641844
notification_emails:
- fenix-core@mozilla.com
expires: "2020-09-01"
use_email_problem:
type: event
description: >
A user chose to use their email to sign in after an account problem
bugs:
- https://github.com/mozilla-mobile/fenix/issues/9834
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/9835#pullrequestreview-398641844
notification_emails:
- fenix-core@mozilla.com
expires: "2020-09-01"
sign_in:
type: event
description: >

View File

@ -217,6 +217,12 @@ private val Event.wrapper: EventWrapper<*>?
is Event.SyncAuthClosed -> EventWrapper<NoExtraKeys>(
{ SyncAuth.closed.record(it) }
)
is Event.SyncAuthUseEmail -> EventWrapper<NoExtraKeys>(
{ SyncAuth.useEmail.record(it) }
)
is Event.SyncAuthUseEmailProblem -> EventWrapper<NoExtraKeys>(
{ SyncAuth.useEmailProblem.record(it) }
)
is Event.SyncAuthSignIn -> EventWrapper<NoExtraKeys>(
{ SyncAuth.signIn.record(it) }
)

View File

@ -75,6 +75,8 @@ sealed class Event {
object SyncAuthSignIn : Event()
object SyncAuthSignOut : Event()
object SyncAuthScanPairing : Event()
object SyncAuthUseEmail : Event()
object SyncAuthUseEmailProblem : Event()
object SyncAuthPaired : Event()
object SyncAuthRecovered : Event()
object SyncAuthOtherExternal : Event()

View File

@ -15,6 +15,7 @@ import mozilla.components.concept.sync.AccountObserver
import mozilla.components.concept.sync.AuthType
import mozilla.components.concept.sync.OAuthAccount
import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.requireComponents
@ -24,6 +25,7 @@ class AccountProblemFragment : PreferenceFragmentCompat(), AccountObserver {
private val signInClickListener = Preference.OnPreferenceClickListener {
requireComponents.services.accountsAuthFeature.beginAuthentication(requireContext())
requireComponents.analytics.metrics.track(Event.SyncAuthUseEmailProblem)
// TODO The sign-in web content populates session history,
// so pressing "back" after signing in won't take us back into the settings screen, but rather up the
// session history stack.

View File

@ -29,6 +29,7 @@ class TurnOnSyncFragment : Fragment(), AccountObserver {
private val signInClickListener = View.OnClickListener {
requireComponents.services.accountsAuthFeature.beginAuthentication(requireContext())
requireComponents.analytics.metrics.track(Event.SyncAuthUseEmail)
// TODO The sign-in web content populates session history,
// so pressing "back" after signing in won't take us back into the settings screen, but rather up the
// session history stack.

View File

@ -175,6 +175,8 @@ The following metrics are added to the ping:
| sync_auth.sign_in |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the sign in button on the sync authentication page and was successfully signed in to FxA |[1](https://github.com/mozilla-mobile/fenix/pull/2745#issuecomment-494918532)||2020-09-01 |
| sync_auth.sign_out |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the sign out button on the sync account page and was successfully signed out of FxA |[1](https://github.com/mozilla-mobile/fenix/pull/2745#issuecomment-494918532)||2020-09-01 |
| sync_auth.sign_up |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |User registered a new Firefox Account, and was signed into it |[1](https://github.com/mozilla-mobile/fenix/pull/4931#issuecomment-529740300)||2020-09-01 |
| sync_auth.use_email |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user chose to use their email to sign in instead of scanning a QR code, counterpart to "scan_pairing" |[1](https://github.com/mozilla-mobile/fenix/pull/9835#pullrequestreview-398641844)||2020-09-01 |
| sync_auth.use_email_problem |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user chose to use their email to sign in after an account problem |[1](https://github.com/mozilla-mobile/fenix/pull/9835#pullrequestreview-398641844)||2020-09-01 |
| tab.media_pause |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the pause icon on a tab from the home screen |[1](https://github.com/mozilla-mobile/fenix/pull/5266)||2020-09-01 |
| tab.media_play |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the play icon on a tab from the home screen |[1](https://github.com/mozilla-mobile/fenix/pull/5266)||2020-09-01 |
| tip.closed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The tip was closed |[1](https://github.com/mozilla-mobile/fenix/pull/9836)|<ul><li>identifier: The identifier of the tip closed</li></ul>|2020-09-01 |