mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Update event label and value name (#6421)
This commit is contained in:
committed by
GitHub
parent
721479b346
commit
eeb0979c3c
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user