Skip to content

Commit a5990e8

Browse files
committed
docs(chore): add event to track when someone clicks through to feedback
1 parent f3990c8 commit a5990e8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/src/components/FeedbackPopover.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ export const FeedbackPopover = () => {
2828
},
2929
})
3030

31+
const handleAnchorClick = () => {
32+
if (window.plausible) {
33+
window.plausible('Clicked through to feedback', {
34+
props: {
35+
location: document.location.pathname,
36+
},
37+
})
38+
}
39+
}
40+
3141
return (
3242
<Popover style={styles}>
3343
<PopoverContent>
@@ -48,7 +58,11 @@ export const FeedbackPopover = () => {
4858
<PopoverTitle>Struggling to find what you want?</PopoverTitle>
4959
<PopoverCopy>
5060
{`We're interested in hearing your feedback for our documentation! Have your voice heard by commenting in this `}
51-
<a href="https://github.com/pmndrs/react-spring/issues/1799">issue</a>
61+
<a
62+
onClick={handleAnchorClick}
63+
href="https://github.com/pmndrs/react-spring/issues/1799">
64+
issue
65+
</a>
5266
</PopoverCopy>
5367
</PopoverContent>
5468
</Popover>

0 commit comments

Comments
 (0)