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 back trackEvents to whats-new-popup #20110

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions shared/constants/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
27 changes: 26 additions & 1 deletion ui/components/app/whats-new-popup/whats-new-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down