Skip to content

Commit

Permalink
Added metric Phishing Page Displayed for phishing warning page
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-mihajlovic committed Jan 27, 2023
1 parent 30520a3 commit 5403c2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3571,6 +3571,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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions shared/constants/metametrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,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',
Expand Down Expand Up @@ -391,6 +392,7 @@ export const EVENT = {
NAVIGATION: 'Navigation',
NETWORK: 'Network',
ONBOARDING: 'Onboarding',
PHISHING: 'Phishing',
RETENTION: 'Retention',
SETTINGS: 'Settings',
SNAPS: 'Snaps',
Expand Down

0 comments on commit 5403c2c

Please sign in to comment.