diff --git a/apps/dokploy/components/proprietary/auth/sign-in-with-github.tsx b/apps/dokploy/components/proprietary/auth/sign-in-with-github.tsx index 60b525867..411e3c7a2 100644 --- a/apps/dokploy/components/proprietary/auth/sign-in-with-github.tsx +++ b/apps/dokploy/components/proprietary/auth/sign-in-with-github.tsx @@ -13,6 +13,8 @@ export function SignInWithGithub() { try { const { error } = await authClient.signIn.social({ provider: "github", + callbackURL: "/dashboard/home", + newUserCallbackURL: "/dashboard/home?signup=github", errorCallbackURL: "/", }); if (error) { diff --git a/apps/dokploy/components/proprietary/auth/sign-in-with-google.tsx b/apps/dokploy/components/proprietary/auth/sign-in-with-google.tsx index 1b62a2bee..4ed015bd4 100644 --- a/apps/dokploy/components/proprietary/auth/sign-in-with-google.tsx +++ b/apps/dokploy/components/proprietary/auth/sign-in-with-google.tsx @@ -13,6 +13,8 @@ export function SignInWithGoogle() { try { const { error } = await authClient.signIn.social({ provider: "google", + callbackURL: "/dashboard/home", + newUserCallbackURL: "/dashboard/home?signup=google", errorCallbackURL: "/", }); if (error) { diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx index 1cbd773b7..4e78303f4 100644 --- a/apps/dokploy/pages/invitation.tsx +++ b/apps/dokploy/pages/invitation.tsx @@ -21,6 +21,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { pushToDataLayer } from "@/lib/analytics"; import { authClient } from "@/lib/auth-client"; import { api } from "@/utils/api"; import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling"; @@ -139,6 +140,9 @@ const Invitation = ({ }); toast.success("Account created successfully"); + if (isCloud) { + pushToDataLayer("sign_up", { method: "invitation" }); + } router.push("/dashboard/home"); } catch { toast.error("An error occurred while creating your account"); diff --git a/apps/dokploy/pages/register.tsx b/apps/dokploy/pages/register.tsx index f18747773..d3c5511cb 100644 --- a/apps/dokploy/pages/register.tsx +++ b/apps/dokploy/pages/register.tsx @@ -24,6 +24,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { pushToDataLayer } from "@/lib/analytics"; import { authClient } from "@/lib/auth-client"; import { useWhitelabelingPublic } from "@/utils/hooks/use-whitelabeling"; @@ -116,6 +117,7 @@ const Register = ({ isCloud }: Props) => { if (!isCloud) { router.push("/"); } else { + pushToDataLayer("sign_up", { method: "email" }); setData(data); } }