📈 Capture pollId with toggling notifications

This commit is contained in:
Luke Vella 2023-03-23 18:22:30 +00:00
parent 49b055a3b7
commit 1fba36f9c8

View file

@ -27,13 +27,17 @@ const NotificationsToggle: React.FunctionComponent = () => {
const watch = trpc.polls.watch.useMutation({
onSuccess: () => {
posthog?.capture("turned notifications on");
posthog?.capture("turned notifications on", {
pollId: poll.id,
});
},
});
const unwatch = trpc.polls.unwatch.useMutation({
onSuccess: () => {
posthog?.capture("turned notifications off");
posthog?.capture("turned notifications off", {
pollId: poll.id,
});
},
});