Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
📈 Track poll notification toggle usage in PostHog (#2271)
Luke Vellac3f34f80660b
diff --git a/apps/web/src/trpc/routers/polls.ts b/apps/web/src/trpc/routers/polls.tsindex 9f6326989..d83a746ad 100644--- a/apps/web/src/trpc/routers/polls.ts+++ b/apps/web/src/trpc/routers/polls.ts@@ -255,6 +255,7 @@ export const polls = router({has_location: !!location,has_description: !!description,timezone: input.timeZone,+ muted: poll.muted,},});@@ -541,6 +542,25 @@ export const polls = router({where: { id: input.pollId },data: { muted: input.muted },});++ ctx.posthog?.groupIdentify({+ groupType: "poll",+ groupKey: input.pollId,+ properties: {+ muted: input.muted,+ },+ });++ ctx.posthog?.capture({+ event: "poll_notification_toggle",+ distinctId: ctx.user.id,+ properties: {+ muted: input.muted,+ },+ groups: {+ poll: input.pollId,+ },+ });}),get: publicProcedure.input(