Configure privacy settings for mobile Session Replay

Last updated:

Session Replay for mobile shows you how visitors interact with your mobile app. With the Privacy Configuration API, you and your development team can apply privacy rules to specific elements, so you control exactly what Session Replay captures and what it hides.

The Privacy Configuration API is available in Pendo Mobile SDK version 3.14.0 and later.

How per-element privacy works

When you set up Session Replay for mobile, you choose a privacy option: Maximum Privacy hides all text, while Inputs Only hides input text fields. These apply to everything in your app at once.

The Privacy Configuration API gives your team greater control. In addition to applying one rule to your whole app, you can mark individual elements to be masked, unmasked, or blocked, regardless of the preset. This is useful when your app shows a mix of sensitive and non-sensitive information on the same screen.

Privacy rules are applied on the device at the moment of capture, so sensitive content is never sent to Pendo.

Privacy actions

There are three privacy actions you can apply to an element:

  • Mask. Replaces text with asterisks, similar to a password field. Interactions and the screen layout are still captured, and images aren't affected.
  • Unmask. Shows text as it appears to the visitor, even when your preset would normally hide it. Use this to keep safe content visible when Maximum Privacy is turned on.
  • Block. Replaces the element, and everything inside it, with a gray box. No text, images, or interactions inside that element are captured.

Note: Masking hides text only. To hide an image, use Block or turn on the Block images setting for your app.

How custom rules work alongside your preset privacy options

Custom rules layer on top of your preset privacy options; they don't replace them. Here are some examples of how that works in practice:

Preset privacy option Custom rule applied to What happens
Maximum Privacy Navigation bar (Unmask) Navigation bar text is visible in captures. Everything else stays hidden.
Maximum Privacy Payment form (Block) The entire form is replaced with a gray box. No content or taps captured.
Inputs Only "Account Balance" label (Mask) The label is hidden even though it's not an input field.
All privacy options Email, phone, or password field (Unmask attempted) Not allowed. These fields are always hidden and can't be unmasked.

Rule priority

If more than one rule applies to the same element, Pendo uses the following order to decide which rule takes effect, from highest to lowest priority:

  1. Always-on protection. Email, phone, and password fields are always hidden. No rule can override this.
  2. Element-specific rule. A rule applied directly to one specific element on the screen.
  3. Privacy preset. Maximum Privacy or Inputs Only.

How rules affect child elements

Elements are often nested. For example, a card might contain a title, a balance, and a button. Parent rules affect the elements inside them:

  • If a parent is blocked, everything inside it is blocked too, with no exceptions.
  • If a parent is masked, the elements inside are masked by default, but you can explicitly unmask individual elements.
  • If a parent is unmasked, the elements inside are unmasked by default, but you can explicitly mask individual elements.

Privacy rules only apply going forward

When you add a rule in a new version of your app, it applies to sessions captured after that version is released. Previous captures aren't changed, because privacy is applied when the session is captured, not when it's played back.

Important: Share this behavior with your security and compliance teams when you plan a rollout, because earlier captures keep the privacy state they had when they were captured.

Before you begin

Before your development team can apply privacy rules, make sure the following are in place:

  • Pendo Mobile SDK version 3.14.0 or later
  • Mobile Session Replay is turned on for your subscription

Supported platforms: Privacy rules are supported for native iOS, native Android, Flutter, MAUI, and Compose Multiplatform. Support for React Native is coming soon.

Apply a rule to a specific element

Your development team can tag individual elements in your app's code to control how each one is captured. The method for doing so depends on the framework your app is built with:

Framework How to apply a rule
iOS (UIKit) A method called on the specific view
iOS (SwiftUI) A view modifier added inline
Android (XML layouts) A tag attribute on the element
Android (Jetpack Compose) A modifier added to the composable
Flutter A widget wrapper or extension
MAUI An attached property or extension
Compose Multiplatform A modifier added to the composable

For example, in Flutter a developer would write:

// Hide a sensitive value
Text('$42,850.00').applyPendoSRPrivacy(PNDSRPrivacyAction.mask);

// Show safe text even when Maximum Privacy is active
Text('Settings').applyPendoSRPrivacy(PNDSRPrivacyAction.unmask);

// Block an entire section — shown as a gray box, nothing captured
PendoSRPrivacy(
  PNDSRPrivacyAction.block,
  child: PaymentDetailsView(),
);

Verify your privacy configuration

You can confirm that your privacy rules work as expected using the Pendo mobile debugger. Capture a replay, then check that the elements you masked or blocked appear correctly in the capture.

Technical documentation

If you're a developer looking for the full API reference and platform-specific implementation guides, see the Pendo Mobile SDK GitHub documentation.

Was this article helpful?
0 out of 0 found this helpful