In GetFeedback Digital for Apps, you have the option to include open text fields in your Forms and Campaigns. These open text fields allow your users to give you valuable Feedback. For example, if you'd like to know why your users have selected an unhappy rating or gave a low score, an open text field is a perfect way of asking for context. The open text fields we have in Apps are the 'Text Input' field and the 'Text Area' field. However, since this is an open text field, users are not restricted from typing in personal data in these fields. When the information left by the user could be used to identify a particular person, this is classified as Personal Identifiable Information (PII), this can be their full name, bank account number, etc. To make sure this information is not sent to GetFeedback Digital, we have a way of masking the PII that is left in the 'Text Input' and 'Text Area' fields. In this article, I'll explain how this feature works and where to find this awesome feature.
This article consists of 3 parts:
- The Regular Expressions to find the PII
- The character that is used to mask the PII
- Where to find the full code
What do you need
- A form or Campaign with an open text field, a 'Text Input' and/or a 'Text Area' element
- A Mobile Developer who can help you implement the code in your App
- GetFeedback Apps SDK 6.2.0 and above
The Regular Expression (RegEx)
In order to find the Personal Identifiable Information in the open text fields, a set of RegExes needs to be included. This RegEx will go through the open text fields in the Forms and Campaigns and when it finds a match, the matched content will be masked. By default, the GetFeedback Apps SDK provides you with RegExes for email addresses and numbers with 4 digits and more. However, you have the option to include your own RegEx as well. So let's say you would like to mask Dutch zipcodes which consist out of 4 numbers and two letters, a RegEx can be created for this and included in the SDK. It's also possible to include multiple RegExes, for example, besides the default RegEx we provide also have a separate RegEx for the Dutch zipcodes.
RegEx: A regular expression (in short RegEx) is a sequence of characters that define a search pattern. This pattern is used to find specific keywords, numbers or other characters in an input field.
In the code we have created for the masking feature, the RegEx part can be identified as:
iOS: Usabilla.setDataMasking(masks: [String]), maskCharacter: Character)
Android: Usabilla.setDataMasking(List<String> masks, char maskCharacter);
The character
When the RegEx has found a match, the matched content will be masked. But, what will it be masked with? It will be masked with a character you can define yourself. By default, the matched content will be masked with 'X's. However, if you'd like to mask the matched content with '#'s, '*'s or any other character, you are free to do so. Just make sure this character is specified in the SDK.
In the code we have created for the masking feature, the character that has to be used to mask the matched content can be identified as:
iOS: Usabilla.setDataMasking(masks: [String]), maskCharacter: Character)
Android: Usabilla.setDataMasking(List<String> masks, char maskCharacter);
Github
To help you start using this great feature, we have included the full code that's needed for this on our Github pages:
Please share these with your Mobile Developers so they can start the fun immediately.
That's it!
Success: With this feature implemented, the Apps Feedback collected in your GetFeedback Digital account will not contain any Personal Identifiable Information!