PostHogOptions
Properties
| Name | Type |
|---|---|
captureAppLifecycleEvents | boolean |
Captures app lifecycle events such as Application Installed, Application Updated, Application Opened, Application Became Active and Application Backgrounded. By default is false. Application Installed and Application Updated events are not supported with persistence set to 'memory'. | |
customAppProperties | PostHogCustomAppProperties | ((properties: PostHogCustomAppProperties) => PostHogCustomAppProperties) |
Allows you to provide your own implementation of the common information about your App or a function to modify the default App properties generated | |
customStorage | PostHogCustomStorage |
Allows you to provide a custom asynchronous storage such as async-storage, expo-file-system or a synchronous storage such as mmkv. If not provided, PostHog will attempt to use the best available storage via optional peer dependencies (async-storage, expo-file-system). If | |
enablePersistSessionIdAcrossRestart | boolean |
If enabled, the session id ($session_id) will be persisted across app restarts. This is an option for back compatibility, so your current data isn't skewed with the new version of the SDK. If this is false, the session id will be always reset on app restart. Defaults to false | |
enableSessionReplay | boolean |
Enable Recording of Session Replays for Android and iOS Requires Record user sessions to be enabled in the PostHog Project Settings Defaults to false | |
errorTracking | ErrorTrackingOptions |
Error Tracking Configuration | |
persistence | 'memory' | 'file' |
Allows you to provide the storage type. By default 'file'. 'file' will try to load the best available storage, the provided 'customStorage', 'customAsyncStorage' or in-memory storage. | |
sessionReplayConfig | PostHogSessionReplayConfig |
Configuration for Session Replay | |