Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
📈 Track paywall events
Luke Vella9ff5d907a018
diff --git a/apps/web/src/app/[locale]/(admin)/sidebar.tsx b/apps/web/src/app/[locale]/(admin)/sidebar.tsxindex 490a70a46..40decc1fc 100644--- a/apps/web/src/app/[locale]/(admin)/sidebar.tsx+++ b/apps/web/src/app/[locale]/(admin)/sidebar.tsx@@ -26,6 +26,7 @@ import { Trans } from "@/components/trans";import { IfGuest, useUser } from "@/components/user-provider";import { IfFreeUser } from "@/contexts/plan";import { IconComponent } from "@/types";+import { usePostHog } from "@/utils/posthog";function NavItem({href,@@ -60,6 +61,7 @@ function NavItem({export function Sidebar() {const pathname = usePathname();const { user } = useUser();+ const posthog = usePostHog();return (<nav className="flex flex-1 flex-col "><ul role="list" className="flex flex-1 flex-col gap-y-7">@@ -105,7 +107,12 @@ export function Sidebar() {<IfFreeUser><li><PayWallDialog>- <DialogTrigger asChild>+ <DialogTrigger+ onClick={() =>+ posthog?.capture("trigger paywall", { from: "sidebar" })+ }+ asChild+ ><button className="mb-4 flex w-full flex-col rounded-md border bg-gray-50 px-4 py-3 focus:border-gray-300 focus:bg-gray-200"><span className="mb-2 flex items-center gap-x-2"><SparklesIcon className="size-5 text-gray-400" />diff --git a/apps/web/src/components/poll/manage-poll.tsx b/apps/web/src/components/poll/manage-poll.tsxindex 8bad599cf..56fe19505 100644--- a/apps/web/src/components/poll/manage-poll.tsx+++ b/apps/web/src/components/poll/manage-poll.tsx@@ -210,6 +210,7 @@ const ManagePoll: React.FunctionComponent<{paywallDialog.trigger();posthog?.capture("trigger paywall", {poll_id: poll.id,+ from: "manage-poll",action: "finalize",});} else {@@ -240,6 +241,7 @@ const ManagePoll: React.FunctionComponent<{posthog?.capture("trigger paywall", {poll_id: poll.id,action: "duplicate",+ from: "manage-poll",});} else {duplicateDialog.trigger();