Add login event (#2784)

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
pull/2552/head^2
Hariom Balhara 2022-05-17 21:52:57 +05:30 committed by GitHub
parent 6b758eeffa
commit 84967e5cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export const telemetryEventTypes = {
bookingCancelled: "booking_cancelled",
importSubmitted: "import_submitted",
googleLogin: "google_login",
login: "login",
samlLogin: "saml_login",
samlConfig: "saml_config",
embedView: "embed_view",

View File

@ -105,6 +105,7 @@ export default function Login({
form={form}
className="space-y-6"
handleSubmit={(values) => {
telemetry.withJitsu((jitsu) => jitsu.track(telemetryEventTypes.login, collectPageParameters()));
signIn<"credentials">("credentials", { ...values, callbackUrl, redirect: false })
.then((res) => {
if (!res) setErrorMessage(errorMessages[ErrorCode.InternalServerError]);