Available for Surveys with Ask or
plans. See the Hotjar pricing page for plans and pricing.
With the User Attributes feature, you can send attributes about your users to Hotjar and then filter Survey responses based on these attributes. You can also use those attributes to target on-site Surveys widgets based on predefined conditions. For example, you could tell Hotjar exactly when somebody signed up for your service, what industry they work in, or what their total customer lifetime value is.
This allows you to target a specific set of users visiting your site, such as “target this Survey to paying customers only”, offering more relevant answers to the questions you have about your users.
If you haven't yet set up User Attributes for a site now, check out our How to Set Up User Attributes article.
Can I see User Attributes in my Survey responses?
After setting up User Attributes, these attributes are currently only visible in the downloaded CSV or XLSX file for your Survey responses.
- Sending User Attributes with Survey responses
- Filtering Survey responses by User Attributes
- Targeting On-site Surveys widgets with User Attributes
Sending User Attributes with Survey responses
Including User Attributes in Survey response exports is available with Ask or
plans.
When exporting your Survey responses, it can be useful to see the User Attributes for users who submitted a response. User Attributes will only be captured alongside responses for on-site Surveys (Popover, Button, Embedded, or Full Screen) and can only be viewed in the downloaded CSV or XLSX Survey responses file. Link Surveys will not include User Attributes with responses, as this type of Survey is hosted by Hotjar, meaning the code used to send User Attributes to Hotjar won’t be present on the Link Survey page.
Filtering Survey responses by User Attributes
After setting up User Attributes, your survey responses will be associated with any attributes that apply. These attributes can then be used to filter your responses list and show only responses that have an attribute matching your filtering condition.
You can apply a filter by clicking Add filter, selecting the relevant attribute and the condition depending on the attribute value type. For more details on attribute value types, see our Identify API Reference.
Targeting On-site Surveys widgets with User Attributes
User Attributes are session-based. On each page load, User Attributes sent throughout the session are reevaluated to determine whether the targeting for a Survey applies.
Enabling Session capture is not required for targeting with User Attributes that are already present in Hotjar
User Attributes that are already available for use inside Hotjar can be used to target Surveys widgets, without needing to enable Session capture. You can check what User Attributes are already available on your User Attributes page. To target based on a new User Attribute that's not already available inside Hotjar, you'll need to execute an Identify API call while sending a Survey response, or while enabling Session capture so that Hotjar can receive the new attribute.
Ensure you've set up User Attributes and that User Attributes is enabled on your User Attributes page.
Create a new Survey widget.
If you're not sure how the following guide can help:
In the Targeting section, select Specific users
Click Add attribute
Once you have selected one attribute and condition, you can add more by clicking Add attribute again. Hotjar will only display the widget if the user matches all the attributes listed. ('AND' logic is used here, not 'OR')
Remember when adding multiple attributes to the targeting rules
If you're combining any triggers with user attribute targeting, then the trigger code will need to be added after your identify API code has executed. This is because the trigger will rely on information the identify API has already sent to Hotjar.
Select the attribute you want to target.
Select the attribute condition you want to trigger the widget on.
This allows you to be more specific about what user attributes the widget can trigger. For example, you could select "all users who became a customer less than 7 days ago".
Once you have selected the correct condition, click Apply. After you've finished creating/editing the Survey widget, it will only appear for users who match the conditions set with your User Attributes filters.