- 08 Jul 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
User Attributes
- Updated On 08 Jul 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
Whatfix User Attributes enables you to fetch end users' information from your app and use them in Widget Visibility Rules for easy content segmentation and personalization.
User information like role, signup date, department, subscription plan, etc. can be fetched and used for segmentation.
- Step 1: Create a User Attribute
- Step 2: Assign values to the User Attribute
- Step 3: Add the User Attribute in Visibility Rules
Whatfix needs to set up an integration that requires some backend configuration. Contact support@whatfix.com to set it up.
Step 1: Create a User Attribute
- On the Whatfix dashboard, click Integrations.
- Click Attributes.
On this page, you can view the list of User Attributes created in your account.
In the User Attributes tab, click + User Attribute.
Enter the User Attribute Name and select its Variable Type.
Click Save.
User Attribute Name:
The user attribute name cannot begin with numbers, include spaces, or contain special characters (except underscores).Variable Type:
- String - Select this option to create a user attribute that matches the string value, such as a user name.
- Encrypted_string - Same as String Variable Type, but the data is encrypted and stored in the database.
- Double - Select this option to specify a single number. For example, employee number.
- Boolean - Select this option to create a user attribute that has either true or false values. For example, whether or not the user had upgraded the plan or visited a specific section of the app.
- Timestamp - Select this option to specify a single date or time, such as the user’s birth date, signup date, etc.
Step 2: Assign values to the User Attribute
Assigning values (user information) to the User Attribute can be used to create and define Visibility Rules for segmentation.
Use the following steps to assign values to the User Attribute:
- On the Whatfix dashboard, click Integrations.
Navigate to the created integration and then click the Edit icon.
Navigate to the Script section and then click Show User Attributes to view all the User Attributes.
You can assign values to the User Attribute of your choice.
When data is fetched using the GET request, data can be transformed into User Attributes using the following sample code.
Once you finish creating the integration, the GET request values are mapped to the User Attribute.
Depending on the type of values you receive using the GET request, the appropriate Variable Type must be selected for the User Attribute.
Step 3: Add the User Attribute in Visibility Rules
Once the values are mapped to the User Attribute, they can be used in the Widget Visibility Rules for content segmentation.
In the Widget Visibility Rules section, select User Attribute.
Select the User Attribute you created.
Select the operator and enter the value.
Configure additional Visibility Rules, if necessary, and finish creating the widget.