diff --git a/backend/src/controllers/v3/signupController.ts b/backend/src/controllers/v3/signupController.ts index cd9efdb0e..1f4a420dd 100644 --- a/backend/src/controllers/v3/signupController.ts +++ b/backend/src/controllers/v3/signupController.ts @@ -11,6 +11,7 @@ import { INVITED, ACCEPTED } from '../../variables'; import { standardRequest } from '../../config/request'; import { getLoopsApiKey, getHttpsEnabled, getJwtSignupSecret } from '../../config'; import { BadRequestError } from '../../utils/errors'; +import { TelemetryService } from '../../services'; /** * Complete setting up user by adding their personal and auth information as part of the @@ -37,6 +38,7 @@ export const completeAccountSignup = async (req: Request, res: Response) => { verifier, organizationName, providerAuthToken, + attributionSource, }: { email: string; firstName: string; @@ -52,6 +54,7 @@ export const completeAccountSignup = async (req: Request, res: Response) => { verifier: string; organizationName: string; providerAuthToken?: string; + attributionSource?: string; } = req.body; user = await User.findOne({ email }); @@ -161,6 +164,18 @@ export const completeAccountSignup = async (req: Request, res: Response) => { sameSite: 'strict', secure: await getHttpsEnabled() }); + + const postHogClient = await TelemetryService.getPostHogClient(); + if (postHogClient) { + postHogClient.capture({ + event: 'User Signed Up', + distinctId: req.user.email, + properties: { + email, + attributionSource + } + }); + } } catch (err) { Sentry.setUser(null); Sentry.captureException(err); diff --git a/frontend/src/components/login/InitialLoginStep.tsx b/frontend/src/components/login/InitialLoginStep.tsx index 973392f64..79b10bbde 100644 --- a/frontend/src/components/login/InitialLoginStep.tsx +++ b/frontend/src/components/login/InitialLoginStep.tsx @@ -1,8 +1,9 @@ import { useTranslation } from 'react-i18next'; import Link from 'next/link'; -import { faGoogle } from '@fortawesome/free-brands-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { useRouter } from 'next/router'; +// import { faGoogle } from '@fortawesome/free-brands-svg-icons'; +// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button } from '../v2'; export default function InitialLoginStep({ @@ -11,11 +12,12 @@ export default function InitialLoginStep({ setIsLoginWithEmail: (value: boolean) => void; }) { + const router = useRouter(); const { t } = useTranslation(); return

Login to Infisical

-
+ {/*
-
-
+
*/} +
+
+ +
Don't have an acount yet? diff --git a/frontend/src/components/signup/EnterEmailStep.tsx b/frontend/src/components/signup/EnterEmailStep.tsx index 406491301..8e63a6062 100644 --- a/frontend/src/components/signup/EnterEmailStep.tsx +++ b/frontend/src/components/signup/EnterEmailStep.tsx @@ -83,9 +83,9 @@ export default function EnterEmailStep({
diff --git a/frontend/src/components/signup/InitialSignupStep.tsx b/frontend/src/components/signup/InitialSignupStep.tsx index 2c804ef71..0de7a91c0 100644 --- a/frontend/src/components/signup/InitialSignupStep.tsx +++ b/frontend/src/components/signup/InitialSignupStep.tsx @@ -1,8 +1,9 @@ import { useTranslation } from 'react-i18next'; import Link from 'next/link'; -import { faGoogle } from '@fortawesome/free-brands-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { useRouter } from 'next/router'; +// import { faGoogle } from '@fortawesome/free-brands-svg-icons'; +// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button } from '../v2'; export default function InitialSignupStep({ @@ -11,10 +12,11 @@ export default function InitialSignupStep({ setIsSignupWithEmail: (value: boolean) => void }) { const { t } = useTranslation(); + const router = useRouter(); - return
+ return

{t('signup.initial-title')}

-
+ {/*
-
-
+
*/} +
+
+ +
{t('signup.create-policy')}
diff --git a/frontend/src/components/signup/TeamInviteStep.tsx b/frontend/src/components/signup/TeamInviteStep.tsx index 5eec01a8f..60628e1c2 100644 --- a/frontend/src/components/signup/TeamInviteStep.tsx +++ b/frontend/src/components/signup/TeamInviteStep.tsx @@ -43,13 +43,13 @@ export default function TeamInviteStep(): JSX.Element {

{t('signup.step5-subtitle')}

-
+
Emails