Add event ping telemetry for the Baidu top site click

upstream-sync
rxu 3 years ago committed by mergify[bot]
parent fc7a92bf10
commit c82af0a97a

@ -3886,6 +3886,19 @@ top_sites:
notification_emails:
- android-probes@mozilla.com
expires: "2022-02-01"
open_baidu_search_attribution:
type: event
description: |
A user opened the baidu top site
bugs:
- https://github.com/mozilla-mobile/fenix/issues/19490
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/20705
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2022-02-01"
open_frecency:
type: event
description: |

@ -129,6 +129,7 @@ sealed class Event {
object NotificationMediaPause : Event()
object TopSiteOpenDefault : Event()
object TopSiteOpenGoogle : Event()
object TopSiteOpenBaidu : Event()
object TopSiteOpenFrecent : Event()
object TopSiteOpenPinned : Event()
object TopSiteOpenInNewTab : Event()

@ -544,6 +544,9 @@ private val Event.wrapper: EventWrapper<*>?
is Event.TopSiteOpenGoogle -> EventWrapper<NoExtraKeys>(
{ TopSites.openGoogleSearchAttribution.record(it) }
)
is Event.TopSiteOpenBaidu -> EventWrapper<NoExtraKeys>(
{ TopSites.openBaiduSearchAttribution.record(it) }
)
is Event.TopSiteOpenFrecent -> EventWrapper<NoExtraKeys>(
{ TopSites.openFrecency.record(it) }
)

@ -372,6 +372,10 @@ class DefaultSessionControlController(
metrics.track(Event.TopSiteOpenGoogle)
}
if (url == SupportUtils.BAIDU_URL) {
metrics.track(Event.TopSiteOpenBaidu)
}
if (url == SupportUtils.POCKET_TRENDING_URL) {
metrics.track(Event.PocketTopSiteClicked)
}

Loading…
Cancel
Save