Skip to content

Commit 18564bb

Browse files
committed
add tracking to video CTA
1 parent 3bd3a14 commit 18564bb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/video/FeaturedVideo.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,23 @@ function FeaturedVideo(props) {
1616
]);
1717
}
1818
}
19+
function handleCTAClick() {
20+
if (typeof _paq !== "undefined") {
21+
_paq.push([
22+
"trackEvent",
23+
"Promo CTA",
24+
"Promo CTA video button",
25+
"Ace Studio",
26+
]);
27+
}
28+
}
1929

2030
return (
2131
<div className="flex flex-col gap-2 lg:gap-4 ">
2232
<div className="flex flex-col xs:flex-row xs:justify-between md:h-10">
2333
<h3 className="text-white content-center">{title}</h3>
2434
{CTA && (
25-
<a className="py-3 px-2 rounded-md justify-center bg-yellow-300 hover:bg-yellow-400 active:bg-yellow-500 w-fit" href={ctaURL}>
35+
<a className="py-3 px-2 rounded-md justify-center bg-yellow-300 hover:bg-yellow-400 active:bg-yellow-500 w-fit" href={ctaURL} onclick={() => handleVideoClick()}>
2636
<p className="leading-none font-semibold">{ctaText}</p>
2737
</a>
2838
)}

0 commit comments

Comments
 (0)