From e4cfd92bb2d9fc7611c5e2ad3d3c255417539b7e Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 16 Sep 2022 16:21:13 -0500 Subject: [PATCH] Track home actions --- web/pages/home/edit.tsx | 2 ++ web/pages/home/index.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/pages/home/edit.tsx b/web/pages/home/edit.tsx index db10b7e4..9670181b 100644 --- a/web/pages/home/edit.tsx +++ b/web/pages/home/edit.tsx @@ -11,6 +11,7 @@ import { useMemberGroups } from 'web/hooks/use-group' import { useTracking } from 'web/hooks/use-tracking' import { useUser } from 'web/hooks/use-user' import { updateUser } from 'web/lib/firebase/users' +import { track } from 'web/lib/service/analytics' import { getHomeItems } from '.' export default function Home() { @@ -52,6 +53,7 @@ function DoneButton(props: { className?: string }) { size="lg" color="blue" className={clsx(className, 'flex whitespace-nowrap')} + onClick={() => track('done editing home')} > Done diff --git a/web/pages/home/index.tsx b/web/pages/home/index.tsx index ae23d18a..fe63582b 100644 --- a/web/pages/home/index.tsx +++ b/web/pages/home/index.tsx @@ -169,7 +169,11 @@ function SectionHeader(props: { return ( - + track('home click section header', { section: href })} + > {label}{' '}