PostHogSessionReplayConfig

Properties

NameType
maskAllTextInputsboolean

Enable masking of all text and text input fields

maskAllImagesboolean

Enable masking of all images to a placeholder

maskAllSandboxedViewsboolean

Enable masking of all sandboxed system views These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController iOS only

captureLogboolean

Enable capturing of logs as console events

iOSdebouncerDelayMsnumber

Deboucer delay used to reduce the number of snapshots captured and reduce performance impact This is used for capturing the view as a screenshot The lower the number more snapshots will be captured but higher the performance impact Deprecated: please use throttleDelayMs instead

androidDebouncerDelayMsnumber

Deboucer delay used to reduce the number of snapshots captured and reduce performance impact This is used for capturing the view as a screenshot The lower the number more snapshots will be captured but higher the performance impact Ps: it was 500ms (0.5s) by default until version 3.3.7 Deprecated: please use throttleDelayMs instead

throttleDelayMsnumber

Throttling delay used to reduce the number of snapshots captured and reduce performance impact This is used for capturing the view as a wireframe or screenshot The lower the number more snapshots will be captured but higher the performance impact

This value has precedence over iOSdebouncerDelayMs and androidDebouncerDelayMs If this is not set, we will take the max number between iOSdebouncerDelayMs and androidDebouncerDelayMs for back compatibility

captureNetworkTelemetryboolean

Enable capturing network telemetry iOS only

verifyScreenshotMaskAlignmentboolean

Verify that masks remain aligned while capturing session replay screenshots. Android only. Requires @posthog/react-native-plugin.

Enabling this can preserve screenshots during pixel-only redraws, including continuously animated content, but performs additional view hierarchy walks while a screenshot is captured.

screenshotScalenumber

Experimental. Multiplier for the physical width and height of screenshots, clamped to 0.1–1.0. For example, 0.5 captures half the width and height, or one quarter of the pixels. The logical replay viewport is unchanged. Non-finite values use the native default. Android only. Requires @posthog/react-native-plugin 2.8.0 or later. Does not enable session replay or change compression quality or color mode.

screenshotCompressionQualitynumber

Experimental. WebP compression quality, clamped to 0–100. Fractional values are truncated. Higher values generally retain more detail and produce larger payloads. Compression is lossy, except at quality 100 on Android 10, which uses lossless WebP. Non-finite values use the native default. Does not change screenshot resolution. Android only. Requires @posthog/react-native-plugin 2.8.0 or later.

screenshotColorMode"ARGB_8888" | "RGB_565"

Experimental. Screenshot bitmap pixel format. ARGB_8888 preserves transparency and color precision. RGB_565 uses half the bitmap memory but reduces color precision and removes alpha, making transparent window regions appear black. Unsupported devices fall back to ARGB_8888. Android only. Requires @posthog/react-native-plugin 2.8.0 or later.

screenshotModeBackgroundCaptureboolean

Schedule screenshot image capture on a background queue. iOS only Experimental support

Warning: Enabling this option will trigger Main Thread Checker warnings and may briefly freeze the app the first time a screenshot is captured. Consider disabling Main Thread Checker in your scheme's run diagnostics when enabling this.

sampleRatenumber

Session replay sample rate between 0 and 1 Local config has precedence over remote config when both are set. If undefined, sampling is controlled by remote config (when available).