{isSMTPConfigured ? (
captureEvent(AUTH_TRACKER_EVENTS.forgot_password)}
+ data-ph-element={AUTH_TRACKER_ELEMENTS.FORGOT_PASSWORD_FROM_SIGNIN}
href={`/accounts/forgot-password?email=${encodeURIComponent(email)}`}
className="text-xs font-medium text-custom-primary-100"
>
@@ -154,17 +151,32 @@ export const AuthPasswordForm: React.FC
= observer((props: Props) => {
: true;
if (isPasswordValid) {
setIsSubmitting(true);
- captureEvent(
- mode === EAuthModes.SIGN_IN
- ? AUTH_TRACKER_EVENTS.sign_in_with_password
- : AUTH_TRACKER_EVENTS.sign_up_with_password
- );
+ captureSuccess({
+ eventName:
+ mode === EAuthModes.SIGN_IN
+ ? AUTH_TRACKER_EVENTS.sign_in_with_password
+ : AUTH_TRACKER_EVENTS.sign_up_with_password,
+ payload: {
+ email: passwordFormData.email,
+ },
+ });
if (formRef.current) formRef.current.submit(); // Manually submit the form if the condition is met
} else {
setBannerMessage(true);
}
}}
- onError={() => setIsSubmitting(false)}
+ onError={() => {
+ setIsSubmitting(false);
+ captureError({
+ eventName:
+ mode === EAuthModes.SIGN_IN
+ ? AUTH_TRACKER_EVENTS.sign_in_with_password
+ : AUTH_TRACKER_EVENTS.sign_up_with_password,
+ payload: {
+ email: passwordFormData.email,
+ },
+ });
+ }}
>
@@ -292,6 +304,7 @@ export const AuthPasswordForm: React.FC = observer((props: Props) => {
{isSMTPConfigured && (