add create/delete logs

This commit is contained in:
Hailey
2024-06-16 01:12:13 -07:00
parent 7182812a31
commit 06b64b65b6
2 changed files with 16 additions and 1 deletions
+7
View File
@@ -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': {}
+9 -1
View File
@@ -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`))