Skip to content

Commit c862f9b

Browse files
committed
add track event tool card click
1 parent 6b8d0d3 commit c862f9b

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

frontend/app/routes/_index.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import SVGWordpressPlugin from '~/assets/images/landing/illustration_wordpress_p
1010
import SVGHeadingVector from '~/assets/images/landing/tools-heading-vector.svg?url'
1111
import { ToolCard } from '~/components/redesign/components/landing/ToolCard'
1212
import { Heading1, Heading3 } from '~/components/redesign/Typography'
13+
import { useTrackEvent } from '~/lib/umami'
1314

1415
const DEFAULT_TITLE = 'Publisher Tools'
1516
const DEFAULT_DESCRIPTION = 'Choose and customize your tools!'
@@ -137,6 +138,8 @@ export const meta: MetaFunction = () => {
137138
}
138139

139140
export default function Index() {
141+
const track = useTrackEvent()
142+
140143
return (
141144
<div className="bg-interface-bg-main min-h-screen flex flex-col gap-2xl items-center pt-5xl pb-xl px-0">
142145
<div className="flex flex-col gap-2xl items-center justify-start px-md py-0 w-full max-w-[1280px]">
@@ -184,7 +187,10 @@ export default function Index() {
184187
}}
185188
>
186189
{setupTools.map((tool, index) => (
187-
<li key={index}>
190+
<li
191+
key={index}
192+
onClick={() => track('click_card_tool', { link: tool.link })}
193+
>
188194
<ToolCard
189195
title={tool.title}
190196
tags={tool.tags}
@@ -228,7 +234,10 @@ export default function Index() {
228234
}}
229235
>
230236
{interactionTools.map((tool, index) => (
231-
<li key={index}>
237+
<li
238+
key={index}
239+
onClick={() => track('click_card_tool', { link: tool.link })}
240+
>
232241
<ToolCard
233242
title={tool.title}
234243
tags={tool.tags}
@@ -266,7 +275,10 @@ export default function Index() {
266275
}}
267276
>
268277
{integrationTools.map((tool, index) => (
269-
<li key={index}>
278+
<li
279+
key={index}
280+
onClick={() => track('click_card_tool', { link: tool.link })}
281+
>
270282
<ToolCard
271283
title={tool.title}
272284
tags={tool.tags}

0 commit comments

Comments
 (0)