From 1fba36f9c867486c1105961599c093cad458a3b5 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Thu, 23 Mar 2023 18:22:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=88=20Capture=20pollId=20with=20toggli?= =?UTF-8?q?ng=20notifications?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/poll/notifications-toggle.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/poll/notifications-toggle.tsx b/apps/web/src/components/poll/notifications-toggle.tsx index d2cb1c419..638a0f4d7 100644 --- a/apps/web/src/components/poll/notifications-toggle.tsx +++ b/apps/web/src/components/poll/notifications-toggle.tsx @@ -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, + }); }, });