Personal data masking helps prevent unnecessary data from being sent to Contentsquare by masking personal data when it could be collected by Session Replay. This includes replacing masked text and images with a blur effect, placeholders, or “lalala” for example.
By default, the Contentsquare SDK masks all content displayed on your user interface (UI). However, there are masking mechanisms available that allow you to be more specific about what is/isn’t masked.
Masking/Unmasking mechanisms
Having all UI content masked by default can make it difficult to analyze your app’s interface in a replay. Therefore, you are able to control which part of the user interface is collected via our masking and un-masking APIs, allowing you to only mask what’s necessary.
This typically happens during your Contentsquare implementation, with the support of your technical team (as it’s done directly in your app’s code). You can mask or unmask specific components in two ways:
-
by ‘type’ (e.g. the model of the component): all instances of this model will be affected by the same masking/unmasking rule, or,
-
by ‘instance’: only a specific instance of a component will be affected by the rule
You can find our technical documentation on this below:
- Personal data masking for iOS - Technical documentation
- Personal data masking for Android - Technical documentation
Caution: Avoiding unnecessary personal data collection
When using unmasking mechanisms, you must ensure that you have masked all personal data on your app to avoid unnecessary data collection.
How masking displays in Session Replay
iOS: Before masking (left) vs full masking applied (right)
- Text is replaced with “la”
- Images are replaced with the “IMG” placeholder
Android: Before masking (left) vs full masking applied (right)
- Text and images are blurred
Full data masking by App and/or CS SDK versions
Note
You will need Admin access to access the Console and manage this feature. Please also note that full data masking does not apply to Capacitor/Cordova, nor Webviews (which rely on tag commands).
Separate from the masking/un-masking APIs above, you can also mask multiple app and/or SDK versions within the Contentsquare Console. This is primarily used if you know, or have concerns, that unnecessary personal data has been exposed, as it allows you to act quickly by applying full masking to specific app versions (and overriding your existing masking configurations).
1. Click your profile icon in the top right, followed by ‘Console’.
2. Click the ‘Data masking’ tab.
3. Under either ‘App version’ or ‘SDK version’ enter the version you want to mask and hit the Enter/Return key on your keyboard.
Note
A maximum of 50 expressions (including version, version range and multiple versions matching a pattern) can be added per field.
4. Select the ‘+ Add’ button to add more versions.
5. Click ‘Apply’, followed by ‘Continue’ after noting the following onscreen information: your changes will take effect for all running sessions, either; when the app is in the background and brought back to the foreground, or, when the app is restarted. Previous configurations or masking rules defined with APIs (as above) will be overridden.
How to input multiple versions matching a pattern, or within a range
- Use the asterisk ‘*’ to define multiple versions matching an exact pattern, for example:
- 4.* would include versions 4.1, 4.2, 4.3 etc, but not 4.1.1
- 4.*.* would include versions 4.1.1, 4.2.2, 4.3.3 etc, but not 4.1 or 4.2 and so on…
- 4.1.*-* would include versions 4.1-beta, 4.1.1-121, 4.1.4-1b etc
- Use the following operators to add multiple versions within a range:
Operator | Description | Example |
> | Strictly superior to | >4.2 includes versions greater than 4.2 such as 4.2.1, 4.2.beta, or 4.2.beta, etc |
>= | Strictly superior or equal to | >=4.2 includes versions greater than or equal to 4.2 such as 4.2, 4.2.1, 4.2.beta, etc |
< | Strictly inferior to | <4.2 includes versions less than 4.2 such as 4.1, 4.1.1, 4.1.beta, etc |
<= | Strictly inferior or equal to | <=4.2 includes versions less than or equal to 4.2 such as 4.2, 4.1, 4.1.1, 4.1.beta, etc |
|| (OR) | Match if one, or both, conditions are true | range1 || range2 match if either range1 or range2 are satisfied |
&& (AND) | Match only if both conditions are true | range1 && range2 match if range1 and range2 are satisfied |
Note: Limitation for composite range operators OR and AND
We can only have 1 || or &&
range1 || range2 || range3, range1 && range2 || range3, range1 && range2 && range3 are not valid.
Version hierarchy
Versions are compared as strings in alphabetical order, with some additional rules for numbers and “nothing”:
- Numbers (0-9) are considered before/lesser than letters (a-z)
- 4.1.1-0 < 4.1.1-alpha (because the number “0” comes before letters “alpha”)
- 4.1.1-alpha < 4.1.1-beta (because “alpha” comes before “beta” alphabetically)
- “Nothing” (e.g. a version without a suffix) is considered inferior to anything else, for example:
- 4.1.1 < 4.1.1-0 (because “nothing” comes before the suffix/anything else)