Merge pull request #5084 from Dokploy/feat/track-cloud-signup

feat: track cloud sign_up event in dataLayer
This commit is contained in:
Mauricio Siu
2026-08-14 10:02:03 -06:00
committed by GitHub
4 changed files with 10 additions and 0 deletions
@@ -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) {
@@ -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) {
+4
View File
@@ -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");
+2
View File
@@ -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);
}
}