add more tracking

zio/stable
Ansh Nanda 2023-08-28 18:55:40 -07:00
parent 8f0f3be8fb
commit 742440c22d
2 changed files with 4 additions and 2 deletions

View File

@ -123,6 +123,7 @@ interface TrackPropertiesMap {
'Onboarding:Begin': {}
'Onboarding:Complete': {}
'Onboarding:Skipped': {}
'Onboarding:Reset': {}
}
interface ScreenPropertiesMap {

View File

@ -14,7 +14,7 @@ type OnboardingStep =
const OnboardingStepsArray = Object.values(OnboardingScreenSteps)
export class OnboardingModel {
// state
step: OnboardingStep = 'Home'
step: OnboardingStep = 'Home' // default state to skip onboarding, only enabled for new users by calling start()
constructor(public rootStore: RootStoreModel) {
makeAutoObservable(this, {
@ -76,11 +76,12 @@ export class OnboardingModel {
reset() {
this.step = 'Welcome'
track('Onboarding:Reset')
}
skip() {
track('Onboarding:Skipped')
this.step = 'Home'
track('Onboarding:Skipped')
}
get isComplete() {