For #6834: Adds telemetry for About page items
Didn't change the existing probe for 'whats new' item because we're already collecting that info.master
parent
7b9f74138c
commit
2026c60136
|
@ -1703,3 +1703,60 @@ top_sites:
|
||||||
notification_emails:
|
notification_emails:
|
||||||
- fenix-core@mozilla.com
|
- fenix-core@mozilla.com
|
||||||
expires: "2020-09-01"
|
expires: "2020-09-01"
|
||||||
|
|
||||||
|
about_page:
|
||||||
|
support_tapped:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user tapped on "Support" item from About page
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/6834
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/8047
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
privacy_notice_tapped:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user tapped on "Privacy notice" item from About page
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/6834
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/8047
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
rights_tapped:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user tapped on "Know your rights" item from About page
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/6834
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/8047
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
licensing_tapped:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user tapped on "Licensing information" item from About page
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/6834
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/8047
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
libraries_tapped:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user tapped on "Libraries that we use" item from About page
|
||||||
|
bugs:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/issues/6834
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/8047
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-09-01"
|
||||||
|
|
|
@ -11,6 +11,7 @@ import kotlinx.coroutines.MainScope
|
||||||
import mozilla.components.service.glean.Glean
|
import mozilla.components.service.glean.Glean
|
||||||
import mozilla.components.service.glean.private.NoExtraKeys
|
import mozilla.components.service.glean.private.NoExtraKeys
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
|
import org.mozilla.fenix.GleanMetrics.AboutPage
|
||||||
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
|
import org.mozilla.fenix.GleanMetrics.BookmarksManagement
|
||||||
import org.mozilla.fenix.GleanMetrics.Collections
|
import org.mozilla.fenix.GleanMetrics.Collections
|
||||||
import org.mozilla.fenix.GleanMetrics.ContextMenu
|
import org.mozilla.fenix.GleanMetrics.ContextMenu
|
||||||
|
@ -466,6 +467,21 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
is Event.TopSiteRemoved -> EventWrapper<NoExtraKeys>(
|
is Event.TopSiteRemoved -> EventWrapper<NoExtraKeys>(
|
||||||
{ TopSites.remove.record(it) }
|
{ TopSites.remove.record(it) }
|
||||||
)
|
)
|
||||||
|
is Event.SupportTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ AboutPage.supportTapped.record(it) }
|
||||||
|
)
|
||||||
|
is Event.PrivacyNoticeTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ AboutPage.privacyNoticeTapped.record(it) }
|
||||||
|
)
|
||||||
|
is Event.RightsTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ AboutPage.rightsTapped.record(it) }
|
||||||
|
)
|
||||||
|
is Event.LicensingTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ AboutPage.licensingTapped.record(it) }
|
||||||
|
)
|
||||||
|
is Event.LibrariesThatWeUseTapped -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ AboutPage.librariesTapped.record(it) }
|
||||||
|
)
|
||||||
// Don't record other events in Glean:
|
// Don't record other events in Glean:
|
||||||
is Event.AddBookmark -> null
|
is Event.AddBookmark -> null
|
||||||
is Event.OpenedBookmark -> null
|
is Event.OpenedBookmark -> null
|
||||||
|
|
|
@ -143,6 +143,11 @@ sealed class Event {
|
||||||
object CustomEngineDeleted : Event()
|
object CustomEngineDeleted : Event()
|
||||||
object PrivateBrowsingShowSearchSuggestions : Event()
|
object PrivateBrowsingShowSearchSuggestions : Event()
|
||||||
object WhatsNewTapped : Event()
|
object WhatsNewTapped : Event()
|
||||||
|
object SupportTapped : Event()
|
||||||
|
object PrivacyNoticeTapped : Event()
|
||||||
|
object RightsTapped : Event()
|
||||||
|
object LicensingTapped : Event()
|
||||||
|
object LibrariesThatWeUseTapped : Event()
|
||||||
|
|
||||||
// Interaction events with extras
|
// Interaction events with extras
|
||||||
|
|
||||||
|
|
|
@ -149,14 +149,29 @@ class AboutFragment : Fragment(), AboutPageListener {
|
||||||
override fun onAboutItemClicked(item: AboutItem) {
|
override fun onAboutItemClicked(item: AboutItem) {
|
||||||
Do exhaustive when (item) {
|
Do exhaustive when (item) {
|
||||||
is AboutItem.ExternalLink -> {
|
is AboutItem.ExternalLink -> {
|
||||||
if (item.type == WHATS_NEW) {
|
when (item.type) {
|
||||||
WhatsNew.userViewedWhatsNew(requireContext())
|
WHATS_NEW -> {
|
||||||
requireComponents.analytics.metrics.track(Event.WhatsNewTapped)
|
WhatsNew.userViewedWhatsNew(requireContext())
|
||||||
|
requireComponents.analytics.metrics.track(Event.WhatsNewTapped)
|
||||||
|
}
|
||||||
|
SUPPORT -> {
|
||||||
|
requireComponents.analytics.metrics.track(Event.SupportTapped)
|
||||||
|
}
|
||||||
|
PRIVACY_NOTICE -> {
|
||||||
|
requireComponents.analytics.metrics.track(Event.PrivacyNoticeTapped)
|
||||||
|
}
|
||||||
|
RIGHTS -> {
|
||||||
|
requireComponents.analytics.metrics.track(Event.RightsTapped)
|
||||||
|
}
|
||||||
|
LICENSING_INFO -> {
|
||||||
|
requireComponents.analytics.metrics.track(Event.LicensingTapped)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openLinkInCustomTab(item.url)
|
openLinkInCustomTab(item.url)
|
||||||
}
|
}
|
||||||
is AboutItem.Libraries -> {
|
is AboutItem.Libraries -> {
|
||||||
|
requireComponents.analytics.metrics.track(Event.LibrariesThatWeUseTapped)
|
||||||
openLibrariesPage()
|
openLibrariesPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,11 @@ The following metrics are added to the ping:
|
||||||
|
|
||||||
| Name | Type | Description | Data reviews | Extras | Expiration |
|
| Name | Type | Description | Data reviews | Extras | Expiration |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
|
| about_page.libraries_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Libraries that we use" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047)||2020-09-01 |
|
||||||
|
| about_page.licensing_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Licensing information" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047)||2020-09-01 |
|
||||||
|
| about_page.privacy_notice_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Privacy notice" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047)||2020-09-01 |
|
||||||
|
| about_page.rights_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Know your rights" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047)||2020-09-01 |
|
||||||
|
| about_page.support_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on "Support" item from About page |[1](https://github.com/mozilla-mobile/fenix/pull/8047)||2020-09-01 |
|
||||||
| bookmarks_management.copied |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user copied a bookmark. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
| bookmarks_management.copied |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user copied a bookmark. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
||||||
| bookmarks_management.edited |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user edited the title and/or URL of an existing bookmark. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
| bookmarks_management.edited |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user edited the title and/or URL of an existing bookmark. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
||||||
| bookmarks_management.folder_add |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user added a new bookmark folder. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
| bookmarks_management.folder_add |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user added a new bookmark folder. |[1](https://github.com/mozilla-mobile/fenix/pull/1708)||2020-09-01 |
|
||||||
|
|
Loading…
Reference in New Issue