From a8d608792d6c6e29b73ffc645b96dd768724339a Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Fri, 25 Oct 2024 09:29:14 +0200 Subject: [PATCH] feat: track personal dashboard seen (#8539) --- .../FeatureStrategyForm/FeatureStrategyForm.tsx | 2 +- .../component/personalDashboard/PersonalDashboard.tsx | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx index 213f02d9d1..c94262c421 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx @@ -227,7 +227,7 @@ export const FeatureStrategyForm = ({ eventType: 'seen', }, }); - }); + }, []); const stickiness = strategy?.parameters && 'stickiness' in strategy?.parameters diff --git a/frontend/src/component/personalDashboard/PersonalDashboard.tsx b/frontend/src/component/personalDashboard/PersonalDashboard.tsx index 34ca3e8ab3..48dcf06e17 100644 --- a/frontend/src/component/personalDashboard/PersonalDashboard.tsx +++ b/frontend/src/component/personalDashboard/PersonalDashboard.tsx @@ -20,6 +20,7 @@ import { useDashboardState } from './useDashboardState'; import { MyFlags } from './MyFlags'; import { usePageTitle } from 'hooks/usePageTitle'; import { fromPersonalDashboardProjectDetailsOutput } from './RemoteData'; +import { useEffect } from 'react'; const WelcomeSection = styled('div')(({ theme }) => ({ display: 'flex', @@ -135,6 +136,14 @@ export const PersonalDashboard = () => { usePersonalDashboardProjectDetails(activeProject), ); + useEffect(() => { + trackEvent('personal-dashboard', { + props: { + eventType: 'seen', + }, + }); + }, []); + return (