Track home actions
This commit is contained in:
parent
25ee793208
commit
e4cfd92bb2
|
@ -11,6 +11,7 @@ import { useMemberGroups } from 'web/hooks/use-group'
|
||||||
import { useTracking } from 'web/hooks/use-tracking'
|
import { useTracking } from 'web/hooks/use-tracking'
|
||||||
import { useUser } from 'web/hooks/use-user'
|
import { useUser } from 'web/hooks/use-user'
|
||||||
import { updateUser } from 'web/lib/firebase/users'
|
import { updateUser } from 'web/lib/firebase/users'
|
||||||
|
import { track } from 'web/lib/service/analytics'
|
||||||
import { getHomeItems } from '.'
|
import { getHomeItems } from '.'
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
@ -52,6 +53,7 @@ function DoneButton(props: { className?: string }) {
|
||||||
size="lg"
|
size="lg"
|
||||||
color="blue"
|
color="blue"
|
||||||
className={clsx(className, 'flex whitespace-nowrap')}
|
className={clsx(className, 'flex whitespace-nowrap')}
|
||||||
|
onClick={() => track('done editing home')}
|
||||||
>
|
>
|
||||||
Done
|
Done
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -169,7 +169,11 @@ function SectionHeader(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row className="mb-3 items-center justify-between">
|
<Row className="mb-3 items-center justify-between">
|
||||||
<SiteLink className="text-xl" href={href}>
|
<SiteLink
|
||||||
|
className="text-xl"
|
||||||
|
href={href}
|
||||||
|
onClick={() => track('home click section header', { section: href })}
|
||||||
|
>
|
||||||
{label}{' '}
|
{label}{' '}
|
||||||
<ArrowSmRightIcon
|
<ArrowSmRightIcon
|
||||||
className="mb-0.5 inline h-6 w-6 text-gray-500"
|
className="mb-0.5 inline h-6 w-6 text-gray-500"
|
||||||
|
@ -349,6 +353,8 @@ function TrendingGroupsSection(props: { user: User | null | undefined }) {
|
||||||
success: `Followed ${g.name}`,
|
success: `Followed ${g.name}`,
|
||||||
error: "Couldn't follow group, try again?",
|
error: "Couldn't follow group, try again?",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
track('home follow group', { group: g.slug })
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user