Product Benefits Pricing Guides Docs About Contact us Try it out
Analytics tools

PostHog Flutter Replay: Text Range Masking Check

PostHog Flutter session replay can now mask selected text ranges. Track masking coverage so account numbers and emails never leak into recordings.

· 3 min read

Session replay is powerful and risky in equal measure. A recording that captures an account number, an email address or a postcode in clear text turns a debugging tool into a data protection incident. Until now, Flutter replay masking worked on whole widgets, so a single text field containing both a label and a sensitive value was masked all or nothing. Teams either hid too much and lost useful context, or hid too little and leaked.

PostHog’s 2 October 2026 update lets Flutter Session Replay mask selected text ranges within a widget, such as only the digits of an account number or the address inside a sentence. That is a finer control, and finer controls need measuring. If you do not track masking coverage, you cannot show that the new rules work.

Data Points to Track

  • replay_masking_config with mode (widget, text_range, none) and rule_count
  • masked_range_count per screen, as a property on $screen
  • sensitive_field_type (account_number, email, phone, address, name, other) for each masked range
  • unmasked_sensitive_detected from your own test checks, with screen_name and field_type
  • replay_recording_started with sdk_version and opt_in_state
  • replay_review_flagged when a reviewer marks a recording as containing exposed data
  • app_version and flutter_version for every replay session

Setup Steps

  1. List every screen that shows personal or financial text and note the exact pattern: a full field, a substring or a dynamic value.
  2. Update to the PostHog Flutter SDK version that supports text range masking and enable it behind a feature flag.
  3. Define masking rules for each pattern. Prefer patterns tied to field types over fixed offsets, because values change length.
  4. Send a masked_range_count property whenever a screen is rendered with replay active.
  5. Add a QA step: open each screen with test data, watch the recording and mark any exposed value.
  6. Log failures as unmasked_sensitive_detected so they appear in a dashboard.
  7. Roll out gradually and review a sample of recordings every week for the first month.

Actionable Insights

Coverage by screen shows where rules are missing. Any screen with sensitive fields and a masked count of zero deserves immediate attention.

Flagged recordings per 1,000 is your leak rate. It should trend to zero. A spike after an app release usually means a layout changed and a rule no longer matches.

Mode mix tells you whether the finer control is being used. If most rules remain whole-widget, you may still be hiding more than necessary, which hurts the usefulness of your replays.

Replay usefulness can be judged by how often support and product teams open recordings. Narrower masking should raise that number without raising the leak rate.

Document the rules and keep them under version control. When a regulator or customer asks how you protect personal data in recordings, you will have both the policy and the evidence.

It also helps to run a quarterly audit. Pick twenty recordings at random, check every sensitive field, and record the result. Trends in that small sample are often the earliest warning that a rule has drifted.