diff --git a/src/lib/statsig/events.ts b/src/lib/statsig/events.ts index 81436b7d07..2e5d14d771 100644 --- a/src/lib/statsig/events.ts +++ b/src/lib/statsig/events.ts @@ -159,6 +159,13 @@ export type LogEvents = { starterPack: string followCount: number } + 'starterPack:delete': {} + 'starterPack:create': { + setName: boolean + setDescription: boolean + profilesCount: number + feedsCount: number + } 'test:all:always': {} 'test:all:sometimes': {} diff --git a/src/screens/StarterPack/Wizard/index.tsx b/src/screens/StarterPack/Wizard/index.tsx index 6b02d6dfc5..488e7eda6b 100644 --- a/src/screens/StarterPack/Wizard/index.tsx +++ b/src/screens/StarterPack/Wizard/index.tsx @@ -22,6 +22,7 @@ import {useQueryClient} from '@tanstack/react-query' import {HITSLOP_10} from 'lib/constants' import {createStarterPackList} from 'lib/generate-starterpack' import {CommonNavigatorParams, NavigationProp} from 'lib/routes/types' +import {logEvent} from 'lib/statsig/statsig' import {enforceLen} from 'lib/strings/helpers' import {isAndroid, isNative, isWeb} from 'platform/detection' import {invalidateActorStarterPacksQuery} from 'state/queries/actor-starter-packs' @@ -342,8 +343,14 @@ function WizardInner({ }, ) - const newRkey = new AtUri(res.uri).rkey + logEvent('starterPack:create', { + setName: state.name != null, + setDescription: state.description != null, + profilesCount: state.profiles.length, + feedsCount: state.feeds.length, + }) + const newRkey = new AtUri(res.uri).rkey setTimeout(() => { navigation.replace('StarterPack', { name: currentAccount!.handle, @@ -374,6 +381,7 @@ function WizardInner({ rkey, }) await invalidateQueries() + logEvent('starterPack:delete', {}) navigation.popToTop() } catch (e) { Toast.show(_(msg`Failed to delete starter pack`))