how to customize the level of privacy in the data captured with session replay, we are seeing a lot of stars
By default, Mixpanel's Session Replay masks most content for privacy — all text, inputs, images, and videos are masked (shown as **** or placeholder boxes). If you're seeing too many stars and want to reveal more content, here's how to customize it:
Web (JavaScript SDK)
Unmask Text
By default, all text is masked. You can selectively unmask specific elements using CSS selectors:
mixpanel.init('YOUR_PROJECT_TOKEN', {
record_sessions_percent: 100,
record_unmask_text_selector: ['.navigation', '.footer', '#public-content']
});Or, to show all text by default and only mask sensitive areas:
mixpanel.init('YOUR_PROJECT_TOKEN', {
record_sessions_percent: 100,
record_mask_all_text: false,
record_mask_text_selector: ['.user-data', '.account-info', '#billing-section']
});Unmask Inputs
By default, all inputs are masked. You can selectively unmask specific input fields:
mixpanel.init('YOUR_PROJECT_TOKEN', {
record_sessions_percent: 100,
record_unmask_input_selector: ['#search-box', '.quantity-input', '[data-public="true"]']
});⚠️ Note: Certain input types are always masked regardless of configuration and cannot be overridden: password, email, tel, hidden, and inputs with autocomplete attributes. [Always Masked Inputs]
You can also use the .mp-mask CSS class directly in your HTML to mask specific elements. [Privacy Controls]
Android SDK
On Android, all text, images, and WebViews are masked by default. You can mark specific views as safe (not masked) using mpReplaySensitive:
// Compose - mark as safe
Image(
painter = painterResource(id = R.drawable.family_photo),
contentDescription = "Family Photo",
modifier = Modifier.mpReplaySensitive(false)
)Note: EditText (input fields) cannot be unmasked. [Android Privacy]
iOS (Swift SDK)
Similarly, you can mark views as safe using mpReplaySensitive:
// SwiftUI
BackgroundImage()
.mpReplaySensitive(false)
// UIKit
let bgImage = BackgroundImage()
bgImage.mpReplaySensitive = falseUITextField inputs cannot be unmasked. [iOS Privacy]
In summary, the key is to use the unmask selectors (web) or mpReplaySensitive(false) (mobile) to reveal content you're comfortable showing, while keeping sensitive data protected.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
