From af20229b41bd2dedbbd52ce77b6366a09f751c7b Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 23 May 2024 11:52:36 -0700 Subject: [PATCH] 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` --- src/lib/statsig/statsig.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx index b7299be8..6ffca0ab 100644 --- a/src/lib/statsig/statsig.tsx +++ b/src/lib/statsig/statsig.tsx @@ -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, },