From 6462c8b61441c0e7f5d212ae8d2e26cfc366ce09 Mon Sep 17 00:00:00 2001 From: Kathryn Middleton Date: Wed, 8 Nov 2023 16:29:28 +0000 Subject: [PATCH] Update event label and value name --- src/components/Layout/Feedback.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Layout/Feedback.tsx b/src/components/Layout/Feedback.tsx index b36112c4718..8639ce12c81 100644 --- a/src/components/Layout/Feedback.tsx +++ b/src/components/Layout/Feedback.tsx @@ -45,14 +45,15 @@ const thumbsDownIcon = ( ); function sendGAEvent(isPositive: boolean) { + const category = isPositive ? 'like_button' : 'dislike_button'; const value = isPositive ? 1 : 0; // Fragile. Don't change unless you've tested the network payload // and verified that the right events actually show up in GA. // @ts-ignore gtag('event', 'feedback', { - event_category: 'button', + event_category: category, event_label: window.location.pathname, - value, + event_value: value, }); }