From 03a974ad24c791e4ac5aad5551205a79b8c5db10 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 25 Oct 2024 11:39:34 +0100 Subject: [PATCH] Add event value --- src/components/PageSponsor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/PageSponsor.tsx b/src/components/PageSponsor.tsx index 28591579b..babf23d79 100644 --- a/src/components/PageSponsor.tsx +++ b/src/components/PageSponsor.tsx @@ -147,10 +147,13 @@ export function PageSponsor(props: PageSponsorProps) { rel="noopener sponsored nofollow" className="fixed bottom-0 left-0 right-0 z-50 flex bg-white shadow-lg outline-0 outline-transparent sm:bottom-[15px] sm:left-auto sm:right-[15px] sm:max-w-[350px]" onClick={async () => { + const labelValue = gaLabel || `${gaPageIdentifier} / ${company} Link`; + window.fireEvent({ category: 'SponsorClick', action: `${company} Redirect`, - label: gaLabel || `${gaPageIdentifier} / ${company} Link`, + label: labelValue, + value: labelValue, }); await clickSponsor(sponsorId || ''); }}