Skip to content

Commit eeb0979

Browse files
authored
Update event label and value name (#6421)
1 parent 721479b commit eeb0979

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Layout/Feedback.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ const thumbsDownIcon = (
4545
);
4646

4747
function sendGAEvent(isPositive: boolean) {
48+
const category = isPositive ? 'like_button' : 'dislike_button';
4849
const value = isPositive ? 1 : 0;
4950
// Fragile. Don't change unless you've tested the network payload
5051
// and verified that the right events actually show up in GA.
5152
// @ts-ignore
5253
gtag('event', 'feedback', {
53-
event_category: 'button',
54+
event_category: category,
5455
event_label: window.location.pathname,
55-
value,
56+
event_value: value,
5657
});
5758
}
5859

0 commit comments

Comments
 (0)