mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-20 20:36:19 +02:00
📈 Capture pollId with toggling notifications
This commit is contained in:
parent
49b055a3b7
commit
1fba36f9c8
1 changed files with 6 additions and 2 deletions
|
@ -27,13 +27,17 @@ const NotificationsToggle: React.FunctionComponent = () => {
|
||||||
|
|
||||||
const watch = trpc.polls.watch.useMutation({
|
const watch = trpc.polls.watch.useMutation({
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
posthog?.capture("turned notifications on");
|
posthog?.capture("turned notifications on", {
|
||||||
|
pollId: poll.id,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const unwatch = trpc.polls.unwatch.useMutation({
|
const unwatch = trpc.polls.unwatch.useMutation({
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
posthog?.capture("turned notifications off");
|
posthog?.capture("turned notifications off", {
|
||||||
|
pollId: poll.id,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue