Skip to content

Commit ca065cc

Browse files
feat: added event to track resume button
1 parent fe26b14 commit ca065cc

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/app/page.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Socials from "@/components/Socials";
2-
import { Button } from "@/components/ui/button";
3-
import { ArrowRightIcon, ArrowUpRight, FileDown } from "lucide-react";
2+
import ResumeButton from "@/components/ResumeButton";
3+
import { ArrowRightIcon, ArrowUpRight } from "lucide-react";
44
// import VaibhavImage from "@/../public/Vaibhav.jpg";
55
// import Image from "next/image";
66
import Link from "next/link";
@@ -46,10 +46,7 @@ export default function Home() {
4646
</div>
4747
<section className="mt-8 flex items-center gap-8">
4848
<Link href="/resume.pdf" target="_blank">
49-
<Button variant="outline">
50-
<span className="font-semibold">Resume</span>
51-
<FileDown className="ml-2 size-5" />
52-
</Button>
49+
<ResumeButton />
5350
</Link>
5451
<Socials />
5552
</section>
@@ -70,7 +67,7 @@ export default function Home() {
7067
</div>
7168
<SectionCards type="projects" limit={LIMIT} />
7269
</section>
73-
70+
7471
<SkillsSection />
7572

7673
<section className="flex flex-col gap-8">

src/components/ResumeButton.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client'
2+
3+
import { Button } from './ui/button'
4+
import { FileDown } from 'lucide-react'
5+
import { sendGAEvent } from '@next/third-parties/google'
6+
7+
const ResumeButton = () => {
8+
return (
9+
<Button onClick={() => sendGAEvent({event: "resumeButton" , value: "resumeButtonClicked"})} variant="outline">
10+
<span className="font-semibold">Resume</span>
11+
<FileDown className="ml-2 size-5" />
12+
</Button>
13+
)
14+
}
15+
16+
export default ResumeButton

0 commit comments

Comments
 (0)