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

For #16827: Add telemetry for copy url. #16915

Merged
merged 2 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,23 @@ events:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-05-10"
copy_url_tapped:
type: event
description: |
An event that indicates that a user has selected
copy option when long pressing on url bar.
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/16827
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/16915
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-05-10"

onboarding:
fxa_auto_signin:
type: event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ sealed class Event {

object TabSettingsOpened : Event()

object CopyUrlUsed : Event()

object SyncedTabOpened : Event()

object RecentlyClosedTabsOpened : Event()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@ private val Event.wrapper: EventWrapper<*>?
{ ProgressiveWebApp.background.record(it) },
{ ProgressiveWebApp.backgroundKeys.valueOf(it) }
)
is Event.CopyUrlUsed -> EventWrapper<NoExtraKeys>(
{ Events.copyUrlTapped.record(it) }
)

is Event.SyncedTabOpened -> EventWrapper<NoExtraKeys>(
{ Events.syncedTabOpened.record(it) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import mozilla.components.browser.state.selector.selectedTab
import mozilla.components.browser.state.store.BrowserStore
import org.mozilla.fenix.R
import org.mozilla.fenix.components.FenixSnackbar
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components
import java.lang.ref.WeakReference

Expand Down Expand Up @@ -74,6 +75,7 @@ object ToolbarPopupWindow {
.setText(context.getString(R.string.browser_toolbar_url_copied_to_clipboard_snackbar))
.show()
}
context.components.analytics.metrics.track(Event.CopyUrlUsed)
}

customView.paste.setOnClickListener {
Expand Down