Skip to content

Commit 800b898

Browse files
committed
feat: add top_boxes custom events
1 parent a89beb9 commit 800b898

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

app/[locale]/developers/page.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ const DevelopersPage = async ({
6969
{
7070
description: t("page-developers-quickstart-1-description"),
7171
command: "npx create-eth@latest",
72+
eventName: "scaffold",
7273
},
7374
{
7475
description: t("page-developers-quickstart-2-description"),
7576
command: "npm init @rainbow-me/rainbowkit@latest",
77+
eventName: "rainbowkit",
7678
},
7779
]
7880

@@ -140,6 +142,11 @@ const DevelopersPage = async ({
140142
href="https://speedrunethereum.com/"
141143
size="lg"
142144
className="mt-4"
145+
customEventOptions={{
146+
eventCategory: "top_boxes",
147+
eventAction: "click",
148+
eventName: "speedrun",
149+
}}
143150
>
144151
{t("page-developers-speedrunethereum-link")}
145152
</ButtonLink>
@@ -149,12 +156,20 @@ const DevelopersPage = async ({
149156
<Card className="!space-y-8 break-words border border-accent-c/20 bg-gradient-to-t from-accent-c/15 to-accent-c/5 px-6 py-10 md:space-y-6 lg:p-12">
150157
<h3>{t("page-developers-jump-right-in-title")}</h3>
151158
<div className="space-y-6">
152-
{quickstarts.map(({ description, command }) => (
159+
{quickstarts.map(({ description, command, eventName }) => (
153160
<div key={command} className="space-y-1">
154161
<div className="font-bold">{description}</div>
155162
<div className="flex items-center rounded-lg border bg-background px-3 py-1">
156163
<div className="flex-1 font-mono text-sm">{command}</div>
157-
<CopyButton message={command} size="sm" />
164+
<CopyButton
165+
message={command}
166+
size="sm"
167+
customEventOptions={{
168+
eventCategory: "top_boxes",
169+
eventAction: "click",
170+
eventName,
171+
}}
172+
/>
158173
</div>
159174
</div>
160175
))}
@@ -164,6 +179,11 @@ const DevelopersPage = async ({
164179
href="https://docs.soliditylang.org/en/latest/"
165180
variant="outline"
166181
className="bg-background"
182+
customEventOptions={{
183+
eventCategory: "top_boxes",
184+
eventAction: "click",
185+
eventName: "solidity",
186+
}}
167187
>
168188
{t("page-developers-solidity-docs")}
169189
</ButtonLink>

0 commit comments

Comments
 (0)