Skip to content

Commit f6e5840

Browse files
committed
feat: update all /developers action trackers
1 parent 9aef607 commit f6e5840

File tree

7 files changed

+74
-34
lines changed

7 files changed

+74
-34
lines changed

app/[locale]/developers/_components/BuilderCard.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ const BuilderCard = ({ path, className }: BuildCardProps) => (
3333
<h3 className="text-lg font-bold">{path.title}</h3>
3434
<p className="mb-4 text-sm text-body-medium">{path.description}</p>
3535
</div>
36-
<ButtonLink href={path.href} className="sm:w-fit">
36+
<ButtonLink
37+
href={path.href}
38+
className="sm:w-fit"
39+
customEventOptions={{
40+
eventCategory: "top_boxes",
41+
eventAction: "click",
42+
eventName: path.tag,
43+
}}
44+
rel="noopener"
45+
>
3746
{path.button}
3847
</ButtonLink>
3948
</Card>

app/[locale]/developers/_components/HackathonCard.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,17 @@ import EventFallback from "@/public/images/events/event-placeholder.png"
1616
type HackathonCardProps = {
1717
event: CommunityConference
1818
className?: string
19-
eventCategory: string
2019
}
2120

22-
const HackathonCard = ({
23-
event,
24-
className,
25-
eventCategory = "Developers",
26-
}: HackathonCardProps) => {
21+
const HackathonCard = ({ event, className }: HackathonCardProps) => {
2722
const { title, href, description, imageUrl, formattedDate, location } = event
2823
return (
2924
<Card
3025
href={href}
3126
key={title + description}
3227
customEventOptions={{
33-
eventCategory,
34-
eventAction: "hackathons",
28+
eventCategory: "hackathons",
29+
eventAction: "click",
3530
eventName: title,
3631
}}
3732
className={className}

app/[locale]/developers/_components/HackathonSwiper/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ import HackathonCard from "../HackathonCard"
88

99
type HackathonSwiperProps = {
1010
events: CommunityConference[]
11-
eventCategory: string
1211
}
1312

14-
const HackathonSwiper = ({ events, eventCategory }: HackathonSwiperProps) => (
13+
const HackathonSwiper = ({ events }: HackathonSwiperProps) => (
1514
<Swiper spaceBetween={16} slidesPerView={1.25}>
1615
{events.map((event, idx) => (
1716
<SwiperSlide key={idx} className="max-2xl:first:ms-8 max-2xl:last:pe-16">
18-
<HackathonCard event={event} eventCategory={eventCategory} />
17+
<HackathonCard event={event} />
1918
</SwiperSlide>
2019
))}
2120
</Swiper>

app/[locale]/developers/_components/VideoCourseCard.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const VideoCourseCard = ({ course, className }: VideoCourseCardProps) => (
1515
<Card
1616
href={course.href}
1717
className={cn("group h-full w-fit rounded-4xl no-underline", className)}
18+
customEventOptions={{
19+
eventCategory: "video-courses",
20+
eventAction: "click",
21+
eventName: course.title,
22+
}}
1823
>
1924
<div className="h-fit w-full overflow-hidden rounded-2xl">
2025
<Image

app/[locale]/developers/page.tsx

Lines changed: 51 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ const DevelopersPage = async ({
8787

8888
const hackathons = (await getHackathons()).slice(0, 5)
8989

90-
const eventCategory = `Developers - ${locale}`
91-
9290
return (
9391
<VStack className="mx-auto my-0 w-full">
9492
<HubHero
@@ -143,7 +141,15 @@ const DevelopersPage = async ({
143141
<h3>{t("page-developers-jump-right-in-title")}</h3>
144142
<p className="text-sm text-body-medium">
145143
{t("page-developers-quickstart-scaffold-subtext")}{" "}
146-
<Link href="https://docs.scaffoldeth.io/">
144+
<Link
145+
href="https://docs.scaffoldeth.io/"
146+
customEventOptions={{
147+
eventCategory: "mid_boxes",
148+
eventAction: "click",
149+
eventName: "scaffold-docs",
150+
}}
151+
rel="noopener"
152+
>
147153
{t("page-developers-quickstart-scaffold-docs")}
148154
</Link>
149155
</p>
@@ -156,9 +162,9 @@ const DevelopersPage = async ({
156162
message="npx create-eth@latest"
157163
size="sm"
158164
customEventOptions={{
159-
eventCategory: "top_boxes",
165+
eventCategory: "mid_boxes",
160166
eventAction: "click",
161-
eventName: "scaffold",
167+
eventName: "scaffold-npx-copy",
162168
}}
163169
/>
164170
</div>
@@ -167,9 +173,9 @@ const DevelopersPage = async ({
167173
<Link
168174
href="https://docs.scaffoldeth.io/llms-full.txt"
169175
customEventOptions={{
170-
eventCategory: "top_boxes",
176+
eventCategory: "mid_boxes",
171177
eventAction: "click",
172-
eventName: "scaffold-llms",
178+
eventName: "scaffold-llms-full",
173179
}}
174180
>
175181
Scaffold-Eth2-llms-full.txt
@@ -197,6 +203,11 @@ const DevelopersPage = async ({
197203
variant="outline"
198204
isSecondary
199205
href="https://ethereum.stackexchange.com/"
206+
customEventOptions={{
207+
eventCategory: "mid_boxes",
208+
eventAction: "click",
209+
eventName: "stack-exchange",
210+
}}
200211
>
201212
{t("page-developers-stack-exchange")}
202213
</ButtonLink>
@@ -230,6 +241,11 @@ const DevelopersPage = async ({
230241
variant="outline"
231242
isSecondary
232243
href="/developers/learning-tools/"
244+
customEventOptions={{
245+
eventCategory: "mid_boxes",
246+
eventAction: "click",
247+
eventName: "play-with-code",
248+
}}
233249
>
234250
{t("page-developers-play-code")}
235251
</ButtonLink>
@@ -256,6 +272,11 @@ const DevelopersPage = async ({
256272
variant="outline"
257273
isSecondary
258274
href="/developers/tutorials/"
275+
customEventOptions={{
276+
eventCategory: "mid_boxes",
277+
eventAction: "click",
278+
eventName: "view-tutorials",
279+
}}
259280
>
260281
{t("page-developers-learn-tutorials-cta")}
261282
</ButtonLink>
@@ -416,24 +437,23 @@ const DevelopersPage = async ({
416437
{/* DESKTOP */}
417438
<Scroller>
418439
{hackathons.map((event, idx) => (
419-
<HackathonCard
420-
key={idx}
421-
event={event}
422-
eventCategory={eventCategory}
423-
className="flex-1"
424-
/>
440+
<HackathonCard key={idx} event={event} className="flex-1" />
425441
))}
426442
</Scroller>
427443
{/* MOBILE */}
428444
<div className="-mx-8 sm:hidden">
429-
<HackathonSwiper
430-
events={hackathons}
431-
eventCategory={eventCategory}
432-
/>
445+
<HackathonSwiper events={hackathons} />
433446
</div>
434447

435448
<div className="flex justify-center">
436-
<ButtonLink href="https://ethglobal.com/">
449+
<ButtonLink
450+
href="https://ethglobal.com/"
451+
customEventOptions={{
452+
eventCategory: "hackathons",
453+
eventAction: "click",
454+
eventName: "visit-ethglobal",
455+
}}
456+
>
437457
{t("page-developers-visit-ethglobal")}
438458
</ButtonLink>
439459
</div>
@@ -454,13 +474,25 @@ const DevelopersPage = async ({
454474
<p>{t("page-developers-founders-desc")}</p>
455475
</div>
456476
<div className="flex flex-wrap justify-center gap-4 text-center">
457-
<ButtonLink href="mailto:[email protected]?subject=Founder%20inquiry">
477+
<ButtonLink
478+
href="mailto:[email protected]?subject=Founder%20inquiry"
479+
customEventOptions={{
480+
eventCategory: "founders",
481+
eventAction: "click",
482+
eventName: "email",
483+
}}
484+
>
458485
{t("page-developers-get-in-touch")}
459486
</ButtonLink>
460487
<ButtonLink
461488
href="/community/grants/"
462489
isSecondary
463490
variant="outline"
491+
customEventOptions={{
492+
eventCategory: "founders",
493+
eventAction: "click",
494+
eventName: "grant-options",
495+
}}
464496
>
465497
{t("page-developers-see-grant-options")}
466498
</ButtonLink>

app/[locale]/developers/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import type { ReactNode } from "react"
44
type CardInfo = {
55
imgSrc: StaticImageData
66
imgAlt: string
7-
title: ReactNode
7+
title: string
88
description: ReactNode
99
href: string
1010
}
1111

1212
export type DevelopersPath = CardInfo & {
1313
button: ReactNode
14-
tag?: string
14+
tag: string
1515
}
1616

1717
export type VideoCourse = CardInfo & {

src/intl/en/page-developers-index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"page-developers-hackathons-desc": "Hackathons are great opportunities to network and learn from others as well as start projects and earn prizes",
9595
"page-developers-visit-ethglobal": "Visit EthGlobal",
9696
"page-developers-founders-title": "Are you a founder?",
97-
"page-developers-founders-desc": "Have a project idea already or working on a prototype? Explore how to take your project to the next step. Many other organizations that provide developers with funding.",
97+
"page-developers-founders-desc": "Have a project idea already or working on a prototype? Explore how to take your project to the next step. We can connect you with relevant organizations and experts in the field.",
9898
"page-developers-get-in-touch": "Get in touch",
9999
"page-developers-see-grant-options": "See grant options",
100100
"page-developers-speedrun-nft-alt": "Speedrun Ethereum NFT banner",

0 commit comments

Comments
 (0)