fix Create Account metrics (#2242)

zio/stable
Ansh 2023-12-19 03:54:06 +05:30 committed by GitHub
parent 3e3a72a366
commit 7af4825911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -13,7 +13,6 @@ interface TrackPropertiesMap {
'Sign In': {resumedSession: boolean} // CAN BE SERVER
'Create Account': {} // CAN BE SERVER
'Try Create Account': {}
'Create Account Successfully': {}
'Signin:PressedForgotPassword': {}
'Signin:PressedSelectService': {}
// COMPOSER / CREATE POST events

View File

@ -189,6 +189,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
},
logger.DebugContext.session,
)
track('Try Create Account')
const agent = new BskyAgent({service})
@ -231,6 +232,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
},
logger.DebugContext.session,
)
track('Create Account')
},
[upsertAccount, queryClient],
)

View File

@ -30,7 +30,7 @@ import {Step2} from './Step2'
import {Step3} from './Step3'
export function CreateAccount({onPressBack}: {onPressBack: () => void}) {
const {track, screen} = useAnalytics()
const {screen} = useAnalytics()
const pal = usePalette('default')
const {_} = useLingui()
const [uiState, uiDispatch] = useCreateAccount()
@ -93,21 +93,17 @@ export function CreateAccount({onPressBack}: {onPressBack: () => void}) {
uiDispatch,
_,
})
track('Create Account')
setBirthDate({birthDate: uiState.birthDate})
if (IS_PROD(uiState.serviceUrl)) {
setSavedFeeds(DEFAULT_PROD_FEEDS)
}
} catch {
// dont need to handle here
} finally {
track('Try Create Account')
}
}
}, [
uiState,
uiDispatch,
track,
onboardingDispatch,
createAccount,
setBirthDate,