Skip to content

Commit

Permalink
Added metric Phishing Page Displayed for phishing warning page (#17462)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-mihajlovic authored Feb 6, 2023
1 parent b4ecc4c commit d63014a
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 @@ -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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions shared/constants/metametrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -393,6 +394,7 @@ export const EVENT = {
NAVIGATION: 'Navigation',
NETWORK: 'Network',
ONBOARDING: 'Onboarding',
PHISHING: 'Phishing',
RETENTION: 'Retention',
SETTINGS: 'Settings',
SNAPS: 'Snaps',
Expand Down

0 comments on commit d63014a

Please sign in to comment.