1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Added back trackEvents to whats-new-popup (#20110)

* Added back trackEvents to whats-new-popup

* Renamed constants

* Fixed code fences issue
This commit is contained in:
Albert Olivé 2023-07-20 16:29:16 +02:00 committed by GitHub
parent 4422ce6eef
commit e8deec28bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -586,6 +586,8 @@ export enum MetaMetricsEventName {
DeeplinkClicked = 'Deeplink Clicked',
ConnectCustodialAccountClicked = 'Connect Custodial Account Clicked',
MMIPortfolioButtonClicked = 'MMI Portfolio Button Clicked',
PortfolioDashboardModalButtonClicked = 'Portfolio Dashboard Modal Button Clicked',
PortfolioDashboardModalOpened = 'Portfolio Dashboard Modal Opened',
StakeButtonClicked = 'Stake Button Clicked',
InteractiveReplacementTokenButtonClicked = 'Interactive Replacement Token Button Clicked',
RefreshTokenListClicked = 'Refresh Token List Clicked',

View File

@ -347,10 +347,26 @@ export default function WhatsNewPopup({
observer.observe(ref.current);
});
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
trackEvent({
category: MetaMetricsEventCategory.MMI,
event: MetaMetricsEventName.MMIPortfolioDashboardModalOpen,
properties: {
action: 'Modal was opened',
},
});
///: END:ONLY_INCLUDE_IN
return () => {
observer.disconnect();
};
}, [idRefMap, setSeenNotifications]);
}, [
idRefMap,
setSeenNotifications,
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
trackEvent,
///: END:ONLY_INCLUDE_IN
]);
// Display the swaps notification with full image
// Displays the NFTs & OpenSea notifications 18,19 with full image
@ -377,6 +393,15 @@ export default function WhatsNewPopup({
completed_all: true,
},
});
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
trackEvent({
category: MetaMetricsEventCategory.MMI,
event: MetaMetricsEventName.MMIPortfolioDashboardModalButton,
properties: {
action: 'Button was clicked',
},
});
///: END:ONLY_INCLUDE_IN
onClose();
}}
popoverRef={popoverRef}