Skip to content

Commit

Permalink
Add country code to registration flow tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Sep 20, 2024
1 parent f161986 commit f7bcd6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions backend/api/src/gidx/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const register: APIHandler<'register-gidx'> = async (
track(auth.uid, 'register user gidx attempt', {
status,
message,
citizenshipCountryCode: body.CitizenshipCountryCode,
idVerified,
})
return {
Expand Down
13 changes: 7 additions & 6 deletions web/components/gidx/register-user-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ export const RegisterUserForm = (props: {
}
}, [user.idVerified, user.kycDocumentStatus, initialUserState, router])

useEffect(() => {
track('register user gidx page change', {
page,
})
}, [page])

const [loading, setLoading] = useState(false)
const [locationError, setLocationError] = useState<string | undefined>()
const [error, setError] = useState<string | null>(null)
Expand Down Expand Up @@ -117,6 +111,13 @@ export const RegisterUserForm = (props: {
'gidx-registration-user-info'
)

useEffect(() => {
track('register user gidx page change', {
page,
citizenshipCountryCode: userInfo.CitizenshipCountryCode,
})
}, [page])

const optionalKeys = ['AddressLine2', 'StateCode']
const unfilled = Object.entries(userInfo ?? {}).filter(
([key, value]) =>
Expand Down

0 comments on commit f7bcd6e

Please sign in to comment.