Mask PII & Sensitive Content
Hide sensitive data and PII from session recordings in your React Native app
Good privacy practices are non-negotiable — especially under GDPR, CCPA, and app store policies. UXCam lets you decide what never gets recorded at three levels: text fields, views, or entire screens.
Dashboard-First Rules (Zero Code)
The most efficient approach is configuring privacy rules directly in your UXCam dashboard:
- Navigate to Settings → Video Recording Privacy
- Choose Record, Occlude, or Blur globally or per screen
- (Optional) Adjust blur radius and Record gestures toggle
- Save → record a test session to verify
Priority ladderScreen-specific Dashboard rule → Global Dashboard rule → SDK overlay/blur → SDK text-field occlusion.
One-Liner Occlusion APIs
Overlay an entire screen
import { OcclusionType } from 'react-native-ux-cam';
const overlay = {
type: OcclusionType.Overlay,
color: 0x000000,
hideGestures: true,
screens: ['Login Form', 'Payment Details'],
};Blur with custom radius
const blur = {
type: OcclusionType.Blur,
blurRadius: 15,
hideGestures: false,
screens: ['User Profile Settings', 'Account Overview'],
};Hide all text inputs
import RNUxcam from 'react-native-ux-cam';
RNUxcam.occludeAllTextFields(true);
// Stop occluding when leaving the screen
RNUxcam.occludeAllTextFields(false);Hide a single sensitive view
import RNUxcam from 'react-native-ux-cam';
// Using ref callback
<TextInput
placeholder="Password"
secureTextEntry
ref={(view) => RNUxcam.occludeSensitiveView(view)}
/>Apply at Config Time (Recommended)
Set all privacy rules during initialization to keep them in one place and avoid race conditions:
import RNUxcam, { OcclusionType } from 'react-native-ux-cam';
const configuration = {
userAppKey: 'YOUR_API_KEY',
enableAutomaticScreenNameTagging: false,
enableImprovedScreenCapture: true,
occlusions: [
{
type: OcclusionType.Overlay,
color: 0x000000,
hideGestures: true,
screens: ['Login Form', 'Payment Details', 'Password Change'],
},
{
type: OcclusionType.Blur,
blurRadius: 15,
hideGestures: false,
screens: ['User Profile Settings', 'Account Overview'],
},
{
type: OcclusionType.OccludeAllTextFields,
screens: ['Search Results', 'Customer Support Chat'],
},
],
};
RNUxcam.optIntoVideoRecording();
RNUxcam.startWithConfiguration(configuration);Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
Success
Negative potential consequences of an action.
Protection Strategy Guide
| Sensitivity Level | Protection Method | Implementation | Maintenance |
|---|---|---|---|
| Entire sensitive screens | Screen overlay/blur | screens: ['Login', 'Payment'] | Low — uses screen names |
| Form sections | Screen-based blur | screens: ['ProfileEdit'] | Low — covers entire form areas |
| Individual fields | View-level occlusion | occludeSensitiveView(ref) | High — per-component setup |
| All text inputs | Text field occlusion | occludeAllTextFields(true) | Medium — affects all text inputs |
Best Practice: Start with screen-based protection using your tagged screen names, then add granular view-level occlusion only where needed.
Verification Checklist
- Record a debug session through all sensitive flows
- Play it back in the dashboard and confirm:
- Passwords and card numbers are overlaid or blurred
- Text fields on protected screens are hidden
- WebView sensitive content is not visible
- Use the Record gestures toggle if taps should not be shown on sensitive screens
- Test on both iOS and Android — occlusion behaviour should be identical
Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| Overlay shows but gestures still visible | hideGestures defaulted to false | Set hideGestures: true |
| Text inputs still visible | Custom component wrapping TextInput | Use occludeSensitiveView(ref) manually |
| Occlusion not applying | Screen names don't match dashboard rules | Verify screen names match exactly |
| WebView leaks card numbers | WebView content not protected | See WebView Occlusion guide |
| Protection only on one platform | Platform-specific rendering differences | Test on both iOS and Android simulators |
