From e55789b9044f23764f423d5bf4a38e9fe78d395a Mon Sep 17 00:00:00 2001 From: kwasniew Date: Fri, 25 Oct 2024 09:22:29 +0200 Subject: [PATCH] feat: track personabl dashboard seen --- .../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 213f02d9d14b..c94262c42167 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 34ca3e8ab346..48dcf06e1707 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 (