parent
77ce658033
commit
4a6e647167
|
@ -1356,6 +1356,30 @@ private_browsing_shortcut:
|
||||||
- fenix-core@mozilla.com
|
- fenix-core@mozilla.com
|
||||||
expires: "2020-03-01"
|
expires: "2020-03-01"
|
||||||
|
|
||||||
|
tab:
|
||||||
|
media_play:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user pressed the play icon on a tab from the home screen
|
||||||
|
bugs:
|
||||||
|
- 5197
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/5266
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
||||||
|
media_pause:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user pressed the pause icon on a tab from the home screen
|
||||||
|
bugs:
|
||||||
|
- 5197
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/5266
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
||||||
|
|
||||||
experiments.metrics:
|
experiments.metrics:
|
||||||
active_experiment:
|
active_experiment:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.mozilla.fenix.GleanMetrics.SearchShortcuts
|
||||||
import org.mozilla.fenix.GleanMetrics.SearchWidget
|
import org.mozilla.fenix.GleanMetrics.SearchWidget
|
||||||
import org.mozilla.fenix.GleanMetrics.SyncAccount
|
import org.mozilla.fenix.GleanMetrics.SyncAccount
|
||||||
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
import org.mozilla.fenix.GleanMetrics.SyncAuth
|
||||||
|
import org.mozilla.fenix.GleanMetrics.Tab
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
|
|
||||||
private class EventWrapper<T : Enum<T>>(
|
private class EventWrapper<T : Enum<T>>(
|
||||||
|
@ -370,6 +371,12 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
{ Events.whatsNewTapped.record(it) },
|
{ Events.whatsNewTapped.record(it) },
|
||||||
{ Events.whatsNewTappedKeys.valueOf(it) }
|
{ Events.whatsNewTappedKeys.valueOf(it) }
|
||||||
)
|
)
|
||||||
|
is Event.TabMediaPlay -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Tab.mediaPlay.record(it) }
|
||||||
|
)
|
||||||
|
is Event.TabMediaPause -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Tab.mediaPause.record(it) }
|
||||||
|
)
|
||||||
|
|
||||||
// Don't record other events in Glean:
|
// Don't record other events in Glean:
|
||||||
is Event.AddBookmark -> null
|
is Event.AddBookmark -> null
|
||||||
|
|
|
@ -113,6 +113,8 @@ sealed class Event {
|
||||||
object PrivateBrowsingPinnedShortcutPrivateTab : Event()
|
object PrivateBrowsingPinnedShortcutPrivateTab : Event()
|
||||||
object PrivateBrowsingStaticShortcutTab : Event()
|
object PrivateBrowsingStaticShortcutTab : Event()
|
||||||
object PrivateBrowsingStaticShortcutPrivateTab : Event()
|
object PrivateBrowsingStaticShortcutPrivateTab : Event()
|
||||||
|
object TabMediaPlay : Event()
|
||||||
|
object TabMediaPause : Event()
|
||||||
|
|
||||||
// Interaction events with extras
|
// Interaction events with extras
|
||||||
|
|
||||||
|
|
|
@ -63,10 +63,12 @@ class TabViewHolder(
|
||||||
play_pause_button.setOnClickListener {
|
play_pause_button.setOnClickListener {
|
||||||
when (tab?.mediaState) {
|
when (tab?.mediaState) {
|
||||||
is MediaState.Playing -> {
|
is MediaState.Playing -> {
|
||||||
|
it.context.components.analytics.metrics.track(Event.TabMediaPlay)
|
||||||
actionEmitter.onNext(TabAction.PauseMedia(tab?.sessionId!!))
|
actionEmitter.onNext(TabAction.PauseMedia(tab?.sessionId!!))
|
||||||
}
|
}
|
||||||
|
|
||||||
is MediaState.Paused -> {
|
is MediaState.Paused -> {
|
||||||
|
it.context.components.analytics.metrics.track(Event.TabMediaPause)
|
||||||
actionEmitter.onNext(TabAction.PlayMedia(tab?.sessionId!!))
|
actionEmitter.onNext(TabAction.PlayMedia(tab?.sessionId!!))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,6 +138,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-03-01 |
|
| 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-03-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-03-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-03-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-03-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-03-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-03-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-03-01 |
|
||||||
|
|
||||||
## metrics
|
## metrics
|
||||||
This is a built-in ping that is assembled out of the box by the Glean SDK.
|
This is a built-in ping that is assembled out of the box by the Glean SDK.
|
||||||
|
|
Loading…
Reference in New Issue