Hide sensitive data
Use these options to keep sensitive data out of Contentsquare when autocapture is enabled. For data retention, storage location, and consent, see Privacy.
Excluding personal data from autocapture
Section titled Excluding personal data from autocaptureWhen using autocapture, the CSQ SDK collects target text information about the element the end-user interacted with, and text data from UI elements further up in an element's ancestry. However, some of these elements might contain end-user's personal data, including sensitive data, that needs to be excluded from data capture.
There are three options for hiding sensitive data:
- Disabling text capture
- Per-view text masking
- Ignoring interactions for specific views
Disabling all text capture
Section titled Disabling all text captureYou have the option to disable text capture for all events that are automatically captured. To do this, use the CSQ.maskTexts() API.
CSQ.maskTexts(true)
CSQ.start(this)Masking text for specific views
Section titled Masking text for specific viewsIf you don't want to disable all text capture for your app, you can take a more targeted approach of only masking text for specific views in your app that you know might contain sensitive data. When text is masked for a view, it will still have target text, but the actual text will be replaced with ****.
val emailField = findViewById<EditText>(R.id.emailField)emailField.csqMaskContents(true)import com.contentsquare.api.compose.CsqMask
@Composablefun EmailField(email: String) { CsqMask(enable = true) { Text(text = email) }}Ignoring all interactions for specific views
Section titled Ignoring all interactions for specific viewsIf you find that certain interactions are prone to capturing sensitive data, or that a certain interaction might indicate sensitive information about a user during analysis, you have the option of ignoring all interactions on a per-view basis.
val sensitiveButton = findViewById<Button>(R.id.sensitiveButton)sensitiveButton.csqIgnoreInteractions()import com.contentsquare.api.compose.CsqIgnoreInteraction
@Composablefun SensitiveButton() { CsqIgnoreInteraction(ignore = true) { Button(onClick = { /* sensitive action */ }) { Text("Sensitive Button") } }}
