Skip to content

Commit 88e260e

Browse files
committed
matomo: ButtonLink customEventOptions
1 parent 4c8e162 commit 88e260e

File tree

1 file changed

+54
-3
lines changed

1 file changed

+54
-3
lines changed

src/pages/index.tsx

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,11 @@ const HomePage = ({
369369
variant="outline"
370370
isSecondary
371371
className="max-sm:self-start"
372+
customEventOptions={{
373+
eventCategory: "Homepage",
374+
eventAction: "learn",
375+
eventName: "learn",
376+
}}
372377
>
373378
{t("page-index:page-index-popular-topics-action")}{" "}
374379
<ChevronNext />
@@ -396,7 +401,16 @@ const HomePage = ({
396401
{t("page-index:page-index-builders-description")}
397402
</p>
398403
<div className="flex flex-wrap gap-6 py-8">
399-
<ButtonLink href="/developers/" size="lg" className="w-fit">
404+
<ButtonLink
405+
href="/developers/"
406+
size="lg"
407+
className="w-fit"
408+
customEventOptions={{
409+
eventCategory: "Homepage",
410+
eventAction: "builders",
411+
eventName: "developers",
412+
}}
413+
>
400414
{t("page-index:page-index-builders-action-primary")}{" "}
401415
<ChevronNext />
402416
</ButtonLink>
@@ -406,6 +420,11 @@ const HomePage = ({
406420
variant="outline"
407421
isSecondary
408422
className="w-fit"
423+
customEventOptions={{
424+
eventCategory: "Homepage",
425+
eventAction: "builders",
426+
eventName: "dev docs",
427+
}}
409428
>
410429
{t("page-index:page-index-builders-action-secondary")}
411430
</ButtonLink>
@@ -528,7 +547,15 @@ const HomePage = ({
528547
<p>{t("page-index:page-index-community-description-3")}</p>
529548
</div>
530549
<div className="flex flex-wrap gap-3 py-8">
531-
<ButtonLink href="/community/" size="lg">
550+
<ButtonLink
551+
href="/community/"
552+
size="lg"
553+
customEventOptions={{
554+
eventCategory: "Homepage",
555+
eventAction: "community",
556+
eventName: "community",
557+
}}
558+
>
532559
{t("page-index:page-index-community-action")} <ChevronNext />
533560
</ButtonLink>
534561
<div className="flex gap-3">
@@ -538,6 +565,11 @@ const HomePage = ({
538565
variant="outline"
539566
isSecondary
540567
hideArrow
568+
customEventOptions={{
569+
eventCategory: "Homepage",
570+
eventAction: "community",
571+
eventName: "discord",
572+
}}
541573
>
542574
<FaDiscord />
543575
</ButtonLink>
@@ -547,6 +579,11 @@ const HomePage = ({
547579
variant="outline"
548580
isSecondary
549581
hideArrow
582+
customEventOptions={{
583+
eventCategory: "Homepage",
584+
eventAction: "community",
585+
eventName: "github",
586+
}}
550587
>
551588
<FaGithub />
552589
</ButtonLink>
@@ -711,6 +748,11 @@ const HomePage = ({
711748
className={cn(
712749
idx === 0 && "col-span-1 sm:col-span-2 md:col-span-1"
713750
)}
751+
customEventOptions={{
752+
eventCategory: "Homepage",
753+
eventAction: "posts",
754+
eventName: title,
755+
}}
714756
>
715757
<CardBanner>
716758
{imageUrl ? (
@@ -748,7 +790,16 @@ const HomePage = ({
748790
</div>
749791
</div>
750792
<div className="flex justify-start py-8">
751-
<ButtonLink href="/community/events/" size="lg" className="mx-auto">
793+
<ButtonLink
794+
href="/community/events/"
795+
size="lg"
796+
className="mx-auto"
797+
customEventOptions={{
798+
eventCategory: "Homepage",
799+
eventAction: "events",
800+
eventName: "community events",
801+
}}
802+
>
752803
{t("page-index:page-index-events-action")} <ChevronNext />
753804
</ButtonLink>
754805
</div>

0 commit comments

Comments
 (0)