Add bundleDate, bundleIdentifier to StatsigUser (#4199)

* record event for fetched ota update

* Revert "record event for fetched ota update"

This reverts commit 4b49efe036c0c9605eabf1d5715586d093d60e9e.

* add `bundleDate` to `StatsigUser`

* include `bundleIdentifier` too

* move to `custom`
This commit is contained in:
Hailey 2024-05-23 11:52:36 -07:00 committed by GitHub
parent 70f190d44f
commit af20229b41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@ import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
import {logger} from '#/logger'
import {isWeb} from '#/platform/detection'
import * as persisted from '#/state/persisted'
import {IS_TESTFLIGHT} from 'lib/app-info'
import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from 'lib/app-info'
import {useSession} from '../../state/session'
import {timeout} from '../async/timeout'
import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
@ -22,6 +22,8 @@ type StatsigUser = {
// This is the place where we can add our own stuff.
// Fields here have to be non-optional to be visible in the UI.
platform: 'ios' | 'android' | 'web'
bundleIdentifier: string
bundleDate: number
refSrc: string
refUrl: string
appLanguage: string
@ -180,6 +182,8 @@ function toStatsigUser(did: string | undefined): StatsigUser {
refSrc,
refUrl,
platform: Platform.OS as 'ios' | 'android' | 'web',
bundleIdentifier: BUNDLE_IDENTIFIER,
bundleDate: BUNDLE_DATE,
appLanguage: languagePrefs.appLanguage,
contentLanguages: languagePrefs.contentLanguages,
},