Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added metric Phishing Page Displayed for phishing warning page #17462

Merged
merged 7 commits into from
Feb 6, 2023
7 changes: 7 additions & 0 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -3591,6 +3591,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