2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00
Codrut Topliceanu 2020-11-10 00:24:46 +02:00 committed by GitHub
parent ebc1ba3b50
commit 23ff2851e6
8 changed files with 2 additions and 213 deletions

View File

@ -433,21 +433,6 @@ onboarding:
- fenix-core@mozilla.com - fenix-core@mozilla.com
- erichards@mozilla.com - erichards@mozilla.com
expires: "2021-08-01" expires: "2021-08-01"
whats_new:
type: event
description:
The onboarding What\'s New card was tapped.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/10824
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/11867
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
- erichards@mozilla.com
expires: "2021-08-01"
pref_toggled_theme_picker: pref_toggled_theme_picker:
type: event type: event
description: description:
@ -1659,67 +1644,6 @@ activation:
no_lint: no_lint:
- USER_LIFETIME_EXPIRATION - USER_LIFETIME_EXPIRATION
qr_scanner:
opened:
type: event
description: |
A user opened the QR scanner
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2524#issuecomment-492739967
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
prompt_displayed:
type: event
description: |
A user scanned a QR code, causing a confirmation prompt to display asking
if they want to navigate to the page
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2524#issuecomment-492739967
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
navigation_allowed:
type: event
description: |
A user tapped "allow" on the prompt, directing the user to the website
scanned
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2524#issuecomment-492739967
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
navigation_denied:
type: event
description: |
A user tapped "deny" on the prompt, putting the user back to the scanning
view
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2524#issuecomment-492739967
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
error_page: error_page:
visited_error: visited_error:
type: event type: event
@ -1858,22 +1782,6 @@ sync_auth:
notification_emails: notification_emails:
- fenix-core@mozilla.com - fenix-core@mozilla.com
expires: "2021-08-01" expires: "2021-08-01"
auto_login:
type: event
description: |
User signed into FxA via an account shared from another locally installed
Mozilla application (e.g. Fennec)
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4971
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4931#issuecomment-529740300
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- technical
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
recovered: recovered:
type: event type: event
description: | description: |
@ -1936,20 +1844,6 @@ sync_account:
notification_emails: notification_emails:
- fenix-core@mozilla.com - fenix-core@mozilla.com
expires: "2021-08-01" expires: "2021-08-01"
closed:
type: event
description: |
A user closed the sync account page
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1190
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/2745#issuecomment-494918532
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
sync_now: sync_now:
type: event type: event
description: | description: |
@ -2592,21 +2486,6 @@ search_widget:
expires: "2021-08-01" expires: "2021-08-01"
private_browsing_mode: private_browsing_mode:
garbage_icon:
type: event
description: |
A user pressed the garbage can icon on the private browsing home page,
deleting all private tabs.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4968
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
snackbar_undo: snackbar_undo:
type: event type: event
description: | description: |
@ -2636,35 +2515,6 @@ private_browsing_mode:
notification_emails: notification_emails:
- fenix-core@mozilla.com - fenix-core@mozilla.com
expires: "2021-08-01" expires: "2021-08-01"
notification_open:
type: event
description: |
A user pressed the private browsing mode notification's "Open" button.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4968
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
notification_delete:
type: event
description: |
A user pressed the private browsing mode notification's "Delete and Open"
button.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/4658
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4968
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
contextual_hint.tracking_protection: contextual_hint.tracking_protection:
display: display:

View File

@ -52,10 +52,6 @@ sealed class Event {
object CustomTabsActionTapped : Event() object CustomTabsActionTapped : Event()
object CustomTabsMenuOpened : Event() object CustomTabsMenuOpened : Event()
object UriOpened : Event() object UriOpened : Event()
object QRScannerOpened : Event()
object QRScannerPromptDisplayed : Event()
object QRScannerNavigationAllowed : Event()
object QRScannerNavigationDenied : Event()
object SyncAuthOpened : Event() object SyncAuthOpened : Event()
object SyncAuthClosed : Event() object SyncAuthClosed : Event()
object SyncAuthSignUp : Event() object SyncAuthSignUp : Event()
@ -70,7 +66,6 @@ sealed class Event {
object SyncAuthFromSharedReuse : Event() object SyncAuthFromSharedReuse : Event()
object SyncAuthFromSharedCopy : Event() object SyncAuthFromSharedCopy : Event()
object SyncAccountOpened : Event() object SyncAccountOpened : Event()
object SyncAccountClosed : Event()
object SyncAccountSyncNow : Event() object SyncAccountSyncNow : Event()
object SendTab : Event() object SendTab : Event()
object SignInToSendTab : Event() object SignInToSendTab : Event()
@ -98,11 +93,8 @@ sealed class Event {
object FindInPageOpened : Event() object FindInPageOpened : Event()
object FindInPageClosed : Event() object FindInPageClosed : Event()
object FindInPageSearchCommitted : Event() object FindInPageSearchCommitted : Event()
object PrivateBrowsingGarbageIconTapped : Event()
object PrivateBrowsingSnackbarUndoTapped : Event() object PrivateBrowsingSnackbarUndoTapped : Event()
object PrivateBrowsingNotificationTapped : Event() object PrivateBrowsingNotificationTapped : Event()
object PrivateBrowsingNotificationOpenTapped : Event()
object PrivateBrowsingNotificationDeleteAndOpenTapped : Event()
object PrivateBrowsingCreateShortcut : Event() object PrivateBrowsingCreateShortcut : Event()
object PrivateBrowsingAddShortcutCFR : Event() object PrivateBrowsingAddShortcutCFR : Event()
object PrivateBrowsingCancelCFR : Event() object PrivateBrowsingCancelCFR : Event()
@ -157,7 +149,6 @@ sealed class Event {
object OnboardingManualSignIn : Event() object OnboardingManualSignIn : Event()
object OnboardingPrivacyNotice : Event() object OnboardingPrivacyNotice : Event()
object OnboardingPrivateBrowsing : Event() object OnboardingPrivateBrowsing : Event()
object OnboardingWhatsNew : Event()
object OnboardingFinish : Event() object OnboardingFinish : Event()
object ChangedToDefaultBrowser : Event() object ChangedToDefaultBrowser : Event()

View File

@ -38,7 +38,6 @@ import org.mozilla.fenix.GleanMetrics.Preferences
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode
import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut
import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp
import org.mozilla.fenix.GleanMetrics.QrScanner
import org.mozilla.fenix.GleanMetrics.ReaderMode import org.mozilla.fenix.GleanMetrics.ReaderMode
import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine
import org.mozilla.fenix.GleanMetrics.SearchShortcuts import org.mozilla.fenix.GleanMetrics.SearchShortcuts
@ -229,18 +228,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.UriOpened -> EventWrapper<NoExtraKeys>( is Event.UriOpened -> EventWrapper<NoExtraKeys>(
{ Events.totalUriCount.add(1) } { Events.totalUriCount.add(1) }
) )
is Event.QRScannerOpened -> EventWrapper<NoExtraKeys>(
{ QrScanner.opened.record(it) }
)
is Event.QRScannerPromptDisplayed -> EventWrapper<NoExtraKeys>(
{ QrScanner.promptDisplayed.record(it) }
)
is Event.QRScannerNavigationAllowed -> EventWrapper<NoExtraKeys>(
{ QrScanner.navigationAllowed.record(it) }
)
is Event.QRScannerNavigationDenied -> EventWrapper<NoExtraKeys>(
{ QrScanner.navigationDenied.record(it) }
)
is Event.ErrorPageVisited -> EventWrapper( is Event.ErrorPageVisited -> EventWrapper(
{ ErrorPage.visitedError.record(it) }, { ErrorPage.visitedError.record(it) },
{ ErrorPage.visitedErrorKeys.valueOf(it) } { ErrorPage.visitedErrorKeys.valueOf(it) }
@ -269,9 +256,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.SyncAuthOtherExternal -> EventWrapper<NoExtraKeys>( is Event.SyncAuthOtherExternal -> EventWrapper<NoExtraKeys>(
{ SyncAuth.otherExternal.record(it) } { SyncAuth.otherExternal.record(it) }
) )
is Event.SyncAuthFromSharedReuse, Event.SyncAuthFromSharedCopy -> EventWrapper<NoExtraKeys>(
{ SyncAuth.autoLogin.record(it) }
)
is Event.SyncAuthRecovered -> EventWrapper<NoExtraKeys>( is Event.SyncAuthRecovered -> EventWrapper<NoExtraKeys>(
{ SyncAuth.recovered.record(it) } { SyncAuth.recovered.record(it) }
) )
@ -284,9 +268,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.SyncAccountOpened -> EventWrapper<NoExtraKeys>( is Event.SyncAccountOpened -> EventWrapper<NoExtraKeys>(
{ SyncAccount.opened.record(it) } { SyncAccount.opened.record(it) }
) )
is Event.SyncAccountClosed -> EventWrapper<NoExtraKeys>(
{ SyncAccount.closed.record(it) }
)
is Event.SyncAccountSyncNow -> EventWrapper<NoExtraKeys>( is Event.SyncAccountSyncNow -> EventWrapper<NoExtraKeys>(
{ SyncAccount.syncNow.record(it) } { SyncAccount.syncNow.record(it) }
) )
@ -375,21 +356,12 @@ private val Event.wrapper: EventWrapper<*>?
is Event.SearchWidgetVoiceSearchPressed -> EventWrapper<NoExtraKeys>( is Event.SearchWidgetVoiceSearchPressed -> EventWrapper<NoExtraKeys>(
{ SearchWidget.voiceButton.record(it) } { SearchWidget.voiceButton.record(it) }
) )
is Event.PrivateBrowsingGarbageIconTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.garbageIcon.record(it) }
)
is Event.PrivateBrowsingSnackbarUndoTapped -> EventWrapper<NoExtraKeys>( is Event.PrivateBrowsingSnackbarUndoTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.snackbarUndo.record(it) } { PrivateBrowsingMode.snackbarUndo.record(it) }
) )
is Event.PrivateBrowsingNotificationTapped -> EventWrapper<NoExtraKeys>( is Event.PrivateBrowsingNotificationTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.notificationTapped.record(it) } { PrivateBrowsingMode.notificationTapped.record(it) }
) )
is Event.PrivateBrowsingNotificationOpenTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.notificationOpen.record(it) }
)
is Event.PrivateBrowsingNotificationDeleteAndOpenTapped -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingMode.notificationDelete.record(it) }
)
is Event.PrivateBrowsingCreateShortcut -> EventWrapper<NoExtraKeys>( is Event.PrivateBrowsingCreateShortcut -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.createShortcut.record(it) } { PrivateBrowsingShortcut.createShortcut.record(it) }
) )
@ -582,9 +554,6 @@ private val Event.wrapper: EventWrapper<*>?
{ Events.tabCounterMenuAction.record(it) }, { Events.tabCounterMenuAction.record(it) },
{ Events.tabCounterMenuActionKeys.valueOf(it) } { Events.tabCounterMenuActionKeys.valueOf(it) }
) )
is Event.OnboardingWhatsNew -> EventWrapper<NoExtraKeys>(
{ Onboarding.whatsNew.record(it) }
)
is Event.OnboardingPrivateBrowsing -> EventWrapper<NoExtraKeys>( is Event.OnboardingPrivateBrowsing -> EventWrapper<NoExtraKeys>(
{ Onboarding.prefToggledPrivateBrowsing.record(it) } { Onboarding.prefToggledPrivateBrowsing.record(it) }
) )
@ -708,6 +677,7 @@ private val Event.wrapper: EventWrapper<*>?
is Event.AddonInstalled -> null is Event.AddonInstalled -> null
is Event.SearchWidgetInstalled -> null is Event.SearchWidgetInstalled -> null
is Event.ChangedToDefaultBrowser -> null is Event.ChangedToDefaultBrowser -> null
is Event.SyncAuthFromSharedReuse, Event.SyncAuthFromSharedCopy -> null
} }
class GleanMetricsService( class GleanMetricsService(

View File

@ -7,7 +7,6 @@ package org.mozilla.fenix.home.intent
import android.content.Intent import android.content.Intent
import androidx.navigation.NavController import androidx.navigation.NavController
import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.sessionsOfType import org.mozilla.fenix.ext.sessionsOfType
@ -22,16 +21,10 @@ class NotificationsIntentProcessor(
override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { override fun process(intent: Intent, navController: NavController, out: Intent): Boolean {
return if (intent.extras?.getBoolean(HomeActivity.EXTRA_DELETE_PRIVATE_TABS) == true) { return if (intent.extras?.getBoolean(HomeActivity.EXTRA_DELETE_PRIVATE_TABS) == true) {
out.putExtra(HomeActivity.EXTRA_DELETE_PRIVATE_TABS, false) out.putExtra(HomeActivity.EXTRA_DELETE_PRIVATE_TABS, false)
activity.components.analytics.metrics.track(Event.PrivateBrowsingNotificationDeleteAndOpenTapped)
activity.components.core.sessionManager.run { activity.components.core.sessionManager.run {
sessionsOfType(private = true).forEach { remove(it) } sessionsOfType(private = true).forEach { remove(it) }
} }
true true
} else if (intent.extras?.getBoolean(HomeActivity.EXTRA_OPENED_FROM_NOTIFICATION) == true) { } else intent.extras?.getBoolean(HomeActivity.EXTRA_OPENED_FROM_NOTIFICATION) == true
activity.components.analytics.metrics.track(Event.PrivateBrowsingNotificationOpenTapped)
true
} else {
false
}
} }
} }

View File

@ -8,9 +8,7 @@ import android.view.View
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.onboarding_whats_new.view.* import kotlinx.android.synthetic.main.onboarding_whats_new.view.*
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.addUnderline import org.mozilla.fenix.ext.addUnderline
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor import org.mozilla.fenix.home.sessioncontrol.OnboardingInteractor
class OnboardingWhatsNewViewHolder( class OnboardingWhatsNewViewHolder(
@ -27,7 +25,6 @@ class OnboardingWhatsNewViewHolder(
view.get_answers.addUnderline() view.get_answers.addUnderline()
view.get_answers.setOnClickListener { view.get_answers.setOnClickListener {
interactor.onWhatsNewGetAnswersClicked() interactor.onWhatsNewGetAnswersClicked()
view.context.components.analytics.metrics.track(Event.OnboardingWhatsNew)
} }
} }

View File

@ -212,11 +212,9 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
toolbarView.view.clearFocus() toolbarView.view.clearFocus()
if (requireContext().settings().shouldShowCameraPermissionPrompt) { if (requireContext().settings().shouldShowCameraPermissionPrompt) {
requireComponents.analytics.metrics.track(Event.QRScannerOpened)
qrFeature.get()?.scan(R.id.search_wrapper) qrFeature.get()?.scan(R.id.search_wrapper)
} else { } else {
if (requireContext().isPermissionGranted(Manifest.permission.CAMERA)) { if (requireContext().isPermissionGranted(Manifest.permission.CAMERA)) {
requireComponents.analytics.metrics.track(Event.QRScannerOpened)
qrFeature.get()?.scan(R.id.search_wrapper) qrFeature.get()?.scan(R.id.search_wrapper)
} else { } else {
interactor.onCameraPermissionsNeeded() interactor.onCameraPermissionsNeeded()
@ -357,11 +355,9 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
) )
setMessage(spannable) setMessage(spannable)
setNegativeButton(R.string.qr_scanner_dialog_negative) { dialog: DialogInterface, _ -> setNegativeButton(R.string.qr_scanner_dialog_negative) { dialog: DialogInterface, _ ->
requireComponents.analytics.metrics.track(Event.QRScannerNavigationDenied)
dialog.cancel() dialog.cancel()
} }
setPositiveButton(R.string.qr_scanner_dialog_positive) { dialog: DialogInterface, _ -> setPositiveButton(R.string.qr_scanner_dialog_positive) { dialog: DialogInterface, _ ->
requireComponents.analytics.metrics.track(Event.QRScannerNavigationAllowed)
(activity as HomeActivity) (activity as HomeActivity)
.openToBrowserAndLoad( .openToBrowserAndLoad(
searchTermOrURL = result, searchTermOrURL = result,
@ -372,7 +368,6 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
} }
create() create()
}.show() }.show()
requireComponents.analytics.metrics.track(Event.QRScannerPromptDisplayed)
} }
} }
) )

View File

@ -84,11 +84,6 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
requireComponents.analytics.metrics.track(Event.SyncAccountOpened) requireComponents.analytics.metrics.track(Event.SyncAccountOpened)
} }
override fun onDestroy() {
super.onDestroy()
requireComponents.analytics.metrics.track(Event.SyncAccountClosed)
}
@ExperimentalCoroutinesApi @ExperimentalCoroutinesApi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)

View File

@ -43,11 +43,9 @@ class TurnOnSyncFragment : Fragment(), AccountObserver {
private val paringClickListener = View.OnClickListener { private val paringClickListener = View.OnClickListener {
if (requireContext().settings().shouldShowCameraPermissionPrompt) { if (requireContext().settings().shouldShowCameraPermissionPrompt) {
requireComponents.analytics.metrics.track(Event.QRScannerOpened)
navigateToPairFragment() navigateToPairFragment()
} else { } else {
if (requireContext().isPermissionGranted(Manifest.permission.CAMERA)) { if (requireContext().isPermissionGranted(Manifest.permission.CAMERA)) {
requireComponents.analytics.metrics.track(Event.QRScannerOpened)
navigateToPairFragment() navigateToPairFragment()
} else { } else {
interactor.onCameraPermissionsNeeded() interactor.onCameraPermissionsNeeded()