Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
📈 Tracking finalize action
Luke Vella673993dd47ed
diff --git a/apps/web/src/pages/poll/[urlId]/finalize.tsx b/apps/web/src/pages/poll/[urlId]/finalize.tsxindex 4a39c24cb..329b0a243 100644--- a/apps/web/src/pages/poll/[urlId]/finalize.tsx+++ b/apps/web/src/pages/poll/[urlId]/finalize.tsx@@ -19,11 +19,14 @@ import { Trans } from "@/components/trans";import { usePlan } from "@/contexts/plan";import { usePoll } from "@/contexts/poll";import { NextPageWithLayout } from "@/types";+import { usePostHog } from "@/utils/posthog";import { getStaticTranslations } from "@/utils/with-page-translations";const FinalizationForm = () => {const plan = usePlan();const poll = usePoll();+ const posthog = usePostHog();+const router = useRouter();const redirectBackToPoll = () => {router.replace(`/poll/${poll.id}`);@@ -60,6 +63,10 @@ const FinalizationForm = () => {optionId: data.selectedOptionId,notify: data.notify,});++ posthog?.capture("finalize poll", {+ pollId: poll.id,+ });}}}/>