Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

📈 Track continue as guest usage

Luke Vella318775726bab
diff --git a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
index a0db3fc70..d4a2adcf9 100644
--- a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
+++ b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
@@ -16,6 +16,7 @@ import { VerifyCode, verifyCode } from "@/components/auth/auth-forms";
import { Spinner } from "@/components/spinner";
import { isSelfHosted } from "@/utils/constants";
import { validEmail } from "@/utils/form-validation";
+import { usePostHog } from "@/utils/posthog";
const allowGuestAccess = !isSelfHosted;
@@ -42,6 +43,8 @@ export function LoginForm() {
const error = searchParams?.get("error");
+ const posthog = usePostHog();
+
const alternativeLoginMethods = React.useMemo(() => {
const res: Array<{ login: () => void; icon: JSX.Element; name: string }> =
[];
@@ -94,13 +97,14 @@ export function LoginForm() {
res.push({
login: () => {
router.push(callbackUrl);
+ posthog?.capture("click continue as guest");
},
icon: <UserIcon className="text-muted-foreground size-5" />,
name: t("continueAsGuest"),
});
}
return res;
- }, [callbackUrl, providers, router, t]);
+ }, [callbackUrl, posthog, providers, router, t]);
if (!providers) {
return (