Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add dataLayer pushes on successful demo and signup submits

Carlos Monastyrskib64798064ef4
diff --git a/frontend/src/components/auth/UserInfoStep.tsx b/frontend/src/components/auth/UserInfoStep.tsx
index 3e3fae40df..6999994b90 100644
--- a/frontend/src/components/auth/UserInfoStep.tsx
+++ b/frontend/src/components/auth/UserInfoStep.tsx
@@ -16,6 +16,7 @@ import {
UnstableIconButton,
UnstableInput
} from "@app/components/v3";
+import { isInfisicalCloud } from "@app/helpers/platform";
import { initProjectHelper } from "@app/helpers/project";
import { completeAccountSignup, useSelectOrganization } from "@app/hooks/api/auth/queries";
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
@@ -125,6 +126,12 @@ export default function UserInfoStep({
SecurityClient.setToken(response.token);
SecurityClient.setProviderAuthToken("");
+ if (isInfisicalCloud()) {
+ console.log("A");
+ window.dataLayer = window.dataLayer || [];
+ window.dataLayer.push({ event: "signup_completed" });
+ }
+
if (response.organizationId) {
await selectOrganization({ organizationId: response.organizationId });
}
diff --git a/frontend/src/global.d.ts b/frontend/src/global.d.ts
index 30b80cb706..8de470d506 100644
--- a/frontend/src/global.d.ts
+++ b/frontend/src/global.d.ts
@@ -8,5 +8,6 @@ declare global {
INTERCOM_ID?: string;
TELEMETRY_CAPTURING_ENABLED: string;
};
+ dataLayer?: Record<string, unknown>[];
}
}
diff --git a/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx b/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
index f1774a0095..1dd6208911 100644
--- a/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
+++ b/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
@@ -16,6 +16,7 @@ import {
UnstableCardTitle,
UnstableInput
} from "@app/components/v3";
+import { isInfisicalCloud } from "@app/helpers/platform";
import { initProjectHelper } from "@app/helpers/project";
import { useToggle } from "@app/hooks";
import { completeAccountSignup, useSelectOrganization } from "@app/hooks/api/auth/queries";
@@ -97,6 +98,11 @@ export const UserInfoSSOStep = ({
SecurityClient.setToken(response.token);
SecurityClient.setProviderAuthToken("");
+ if (isInfisicalCloud()) {
+ window.dataLayer = window.dataLayer || [];
+ window.dataLayer.push({ event: "signup_completed" });
+ }
+
const userOrgs = await fetchOrganizations();
const orgId = userOrgs[0]?.id;