Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Add event ping telemetry for the Baidu top site click
Browse files Browse the repository at this point in the history
  • Loading branch information
rxumoz committed Aug 6, 2021
1 parent ca51ac6 commit 4cbe5df
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3991,6 +3991,19 @@ top_sites:
notification_emails:
- [email protected]
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:
- [email protected]
expires: "2022-02-01"
open_frecency:
type: event
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,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) }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,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)
}
Expand Down

0 comments on commit 4cbe5df

Please sign in to comment.