From d63014a3607d4100aaed4e2c7799006e006e0486 Mon Sep 17 00:00:00 2001 From: aleksandar-mihajlovic <120601632+aleksandar-mihajlovic@users.noreply.github.com> Date: Mon, 6 Feb 2023 18:06:38 +0100 Subject: [PATCH] Added metric Phishing Page Displayed for phishing warning page (#17462) --- app/scripts/metamask-controller.js | 7 +++++++ shared/constants/metametrics.js | 2 ++ 2 files changed, 9 insertions(+) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 37761cb3cb39..6947f6eae17e 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -3610,6 +3610,13 @@ export default class MetamaskController extends EventEmitter { hostname, phishingTestResponse, ); + this.metaMetricsController.trackEvent({ + event: EVENT_NAMES.PHISHING_PAGE_DISPLAYED, + category: EVENT.CATEGORIES.PHISHING, + properties: { + url: hostname, + }, + }); return; } } diff --git a/shared/constants/metametrics.js b/shared/constants/metametrics.js index 5e3f0e2f3df6..8f4cf4b5b3d0 100644 --- a/shared/constants/metametrics.js +++ b/shared/constants/metametrics.js @@ -333,6 +333,7 @@ export const EVENT_NAMES = { PERMISSIONS_APPROVED: 'Permissions Approved', PERMISSIONS_REJECTED: 'Permissions Rejected', PERMISSIONS_REQUESTED: 'Permissions Requested', + PHISHING_PAGE_DISPLAYED: 'Phishing Page Displayed', PORTFOLIO_LINK_CLICKED: 'Portfolio Link Clicked', PUBLIC_ADDRESS_COPIED: 'Public Address Copied', PROVIDER_METHOD_CALLED: 'Provider Method Called', @@ -393,6 +394,7 @@ export const EVENT = { NAVIGATION: 'Navigation', NETWORK: 'Network', ONBOARDING: 'Onboarding', + PHISHING: 'Phishing', RETENTION: 'Retention', SETTINGS: 'Settings', SNAPS: 'Snaps',