In this article, we'll discuss some common questions, tips, and tricks related to User Attributes. Click on the section that you're interested in, or scroll down to view all the FAQs on this page:
- What are some use cases for User Attributes?
- Can Hotjar help me create or implement User Attributes on my site?
- I copied the User Attributes code to my site. Why isn't it working?
- Is there a limit to the number of attributes we can send to Hotjar?
- How do I enable User Attributes?
- How do I disable User Attributes?
- How can I check to see if my attributes are sending successfully?
- We created some attributes during testing, how do we delete them?
What are some use cases for User Attributes?
Check out a list of possible use cases in our What are User Attributes article. If you have some additional ideas, use our Incoming Feedback widget on that page to let us know!
Can Hotjar help me create or implement User Attributes on my site?
Since sending attributes using the Identify API relies heavily on custom code, it is not something that Hotjar support can assist with. Our recommendation is to send the Identify API Reference to your developer(s) and have them implement the feature on your site.
I copied the User Attributes code to my site. Why isn't it working?
It's important to know that setting up User Attributes will require custom code from your developer. If you only copied and pasted the sample code shown below without making changes to fit your site, the feature will not work because Hotjar isn't receiving any attribute data from your database.
Yes, you can send up to 100 unique User Attributes on any site, with any number of users associated with those attributes.
How do I enable User Attributes?
By default, the ability to use User Attributes will be enabled for Business customers. However, the feature won't work until your developer has added code to your site, to send data to Hotjar via our Identify API.
How do I disable User Attributes?
Follow these steps to Disable User Attributes. However, keep in mind that you'll only see a "Disable" button if you've already sent User Attribute data to Hotjar. If Hotjar never received any data through the Identify API, a "Disable" option will not appear.
How can I check to see if my attributes are sending successfully?
Following the steps below will allow you to confirm if your User Attributes are successfully sent and received by Hotjar. This process involves using your browser's developer tools. If you're not familiar with your browser console or developer tools, consider looping in a team member who has more knowledge of these tools, or a web developer, to assist you.
Enable Hotjar debug logs in your browser console
Open the page where you want to test the User Attributes and add the ?hjDebug=1 parameter to the end of the URL. Here are a couple of examples of what it might look like:
Open your browser console
If you're not familiar with your browser developer tools, or the console, check out this guide to learn how to open your browser console. Below are some keyboard shortcuts for a few popular browsers:
Chrome - Cmd+Option+J
Firefox - Cmd+Option+K
Safari - Cmd+Option+C
Send the attribute manually
To send your User Attribute manually, add the Identify API code in your browser console and press Enter or Return on your keyboard. If the Identify API call was successful, you'll see a confirmation log similar to this:
We also recommend that you go through the steps that your user would, to ensure that the Identify API call is being sent organically on each page. If the API call is sent automatically, then you'll know that your code is implemented successfully.
If the same Identify API call is detected when sent manually, but not automatically when testing the user journey, then you may need to revisit your code and ensure that the Identify API code is being added to all the pages you plan to track.
We created some attributes while testing, how do we delete them?
Currently, it's not possible to delete attributes that have already been sent to Hotjar through your dashboard. This can only be accomplished by Hotjar engineers and is a complicated process because User Attribute data is not all stored in one place.
If you'd like Hotjar to remove the attributes from your dashboard, please follow these steps first:
Remove all Identify API code
This will prevent your site from sending incorrect or unwanted attributes to Hotjar and will prevent new attributes from being added after we clear them out.
Remove Recordings associated with unwanted attributes
If you have any Recordings with Personally Identifying Information (PII), you will need to delete these Recordings before we delete the associated attributes.
Provide details to Hotjar Support
Send us a comma separated list (.csv) of the attributes you do not need, we can manually delete these user attributes. You can attach this file to a Support ticket when you've completed steps 1 and 2. To open a Support ticket, submit a request.
Follow steps 1 and 2 before contacting Support
It's really important to follow steps 1 and 2 before opening a Support ticket. Without step 1, it's possible for additional unwanted attributes to be sent to Hotjar after the others are deleted. Step 2 needs to be done before your attribute data is deleted in order to avoid Hotjar holding personally identifying information that cannot be managed in a privacy-legislation compliant manner. Failure to do this step might result in legal implications for your website, depending on your jurisdiction.
- Why can't I see any Recordings when I filter by my User Attribute?
- Can I use User Attributes for targeting users with Recordings?
Check to see if you are trying to send an email address or other personally identifiable information (PII) to Hotjar without a User ID. If so, these calls will be blocked and the call will fail. To solve this, be sure that you only ever send PII to Hotjar when it's being associated with a unique User ID (defined in your API call).
Currently, it's not possible to target Recordings based on User Attributes. You can target based on URLs and Events only.
Surveys and Incoming Feedback
- Why can't I see User Attributes listed in my Survey responses?
- Why can't I see User Attributes listed in my Incoming Feedback responses?
- My Survey or Incoming Feedback is targeting users based on specific User Attributes, but I'm not getting any responses. Why not?
At this time, User Attributes will only appear in Survey export/download files. However, in the future, we plan to include them in the responses as they appear in your Hotjar dashboard.
At this time, User Attributes are not associated with Incoming Feedback responses.
My Survey or Incoming Feedback is targeting users based on specific User Attributes, but I'm not getting any responses. Why not?
If the Survey was just recently activated, it could be that users haven't replied yet. However, if it's been active for a few days, or if you have a very high traffic website, it could mean that the targeting isn't set up correctly.
Once a Survey with User Attribute targeting is active, Hotjar does the following on every page:
- Checks to see if the URL matches.
- Listens for an Identify API call (this is what sends Hotjar User Attributes).
- The API call will trigger a check to see if Hotjar needs to show a feedback tool.
- If an attribute matches the feedback target criteria, it will show. (For Surveys, you should keep in mind the Survey's persistence/behavior settings.)
- Once the page changes, the feedback tool will go away, and the cycle starts again.
To ensure the User Attributes are firing correctly:
- Ensure that the Identify API code is being fired on every page on your site, the User Attribute(s) should be sent to Hotjar on every page that you would like to track.
- Be sure the User Attributes are being fired on the page where you want the Hotjar Survey or widget to appear. It will not work if the code is fired on a previous page, because as soon as the page changes or a redirect occurs, the code will be forgotten and the targeting evaluation will restart.
- Ensure that the User Attributes that you're sending have matching types and values. For example, here are the available types of attributes you can send:
- Strings (text characters)
- Booleans (true/false)
- If you're sending an attribute with a Number type, but the value includes non-numeric characters, the Identify API call will fail.