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:Begin': {}
'Onboarding:Complete': {} 'Onboarding:Complete': {}
'Onboarding:Skipped': {} 'Onboarding:Skipped': {}
'Onboarding:Reset': {}
} }
interface ScreenPropertiesMap { interface ScreenPropertiesMap {

View File

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