User Attribute targeting is only available to Business plan customers
Read more about Hotjar pricing by plan. User Attributes can only be used on V2 billing plans or newer. If you are unsure which billing plan version you are on, read about How to Identify your Billing Version.
User Attributes are facts about your users taken from your site’s data that you can use to more quickly gain insight into the behavior and needs of the users who matter most to your business. Currently, they can be used to target Polls and Incoming Feedback to users with specific attributes. A practical example of this would be showing a Poll only to customers who have spent more than €100 in the past month.
Before you can start using User Attributes, the data for them needs to be sent to Hotjar from your site. Because these attributes come from your own site data, Hotjar needs a little extra setup before it has access to them.
Setting up User Attributes is a 4-Step Process
- Decide on the User Attributes most relevant to your business
- Review your privacy considerations and enable User Attributes
- Implement the code which sends User Attributes to Hotjar using the Identify API
- Start using User Attributes in Hotjar!
Step 1: Decide on the User Attributes most relevant to your business
You should start by assessing what data from your own site's database you want to send to Hotjar as User Attributes.
At a minimum, you should have a unique User ID from your site's database, that you can send to Hotjar. While you can send User Attributes to Hotjar without one, you should ensure that no personal information is sent as a User Attribute unless you have a User ID.
Below you will find a summary of the data types you can send to Hotjar, though a full breakdown of requirements is available in the Identify API reference guide.
Strings: text values
Strings are incredibly flexible. As long as the string is no more than 100 characters long, you can include anything here. For example:
- City name. e.g. “London” Subscription plan level. e.g. “Premium” or “Basic”
- Acquisition campaign. e.g. “facebook-paid-sept-19”
- Last item purchased. e.g. “t_shirt”
Email addresses can also be sent as a string, with some limitations:
- You must have a user_id before Hotjar will accept you sending an email.
- The user attribute name must be “email”.
- Any other user attributes that contain an email address will be rejected by Hotjar.
Numbers:
Numbers are useful when you need to be able to target or filter based on numerical values. For example, you might only be interested in showing a Poll to customers who have spent more or less than a certain amount in total with your service.
Booleans:
These are true/false values that are great for quickly identify whether someone belongs to a category you’re interested in. For example, you might only be interested in targeting a Poll at members of your subscription service.
Dates:
Date values are useful for targeting based on when a user did something on your site. For example, you could send a Poll only to people who recently signed up for your service - or only your longest standing customers.
Step 2: Review your privacy requirements and enable User Attributes
With just the Hotjar tracking code on your site, Hotjar has been designed to help you anonymize data as much as possible by default, making it easy to conform with privacy legislation such as the GDPR without having to undergo too much extra work.
User Attributes are slightly different, since they can include Personally Identifying Information (PII). With User Attributes we want to empower your ability to manage personal information sent to Hotjar while complying with privacy legislation. You can read more about Hotjar's stance on privacy on our privacy page. We recommend reviewing your data privacy requirements before implementing User Attributes, and request that you have accepted our Data Processing Agreement with us before using User Attributes
Once User Attributes are being sent to Hotjar, you have the ability to lookup and delete user data based on a user's User ID in addition to their email address. You are required to send a User ID if you wish to send any PII to Hotjar as a User Attribute. You can read more about this in our article about visitor lookup, what are Hotjar's Visitor Lookup features?
User Attributes must be enabled in app before you can begin using them.
Enabling and disabling User Attributes
The ability to send User Attributes to Hotjar will be disabled until you have enabled them in your User Attributes page.
On your User Attributes page (Settings > User Attributes), find the Site you want to add User Attributes to using the selection drop down, and click Enable User Attributes.
You will be presented with a dialogue box asking you to confirm you have reviewed privacy considerations before enabling User Attributes, including agreeing to have signed a Data Processing Agreement with us.
Once enabled, calls to the Identify API will pass User Attribute data to Hotjar for this Site.
You are also able to disable User Attributes on this page. Once you have selected the Site with User Attributes enabled that you want to disable, click Disable User Attributes. Once you have done this, further calls to the API will be blocked.
Any reports that rely on User Attributes for targeting purposes will be disabled, and you will not be able to re-enable them unless you change their targeting options, or re-enable User Attributes.
As long as User Attributes are enabled on your site, if you want to prevent them being sent in future, you should remove the code on your site sending them to Hotjar. Once the code is deleted from your site, previously collected User Attributes will still exist, though will no longer be updated or added to new users to your site.
Step 3: Implement the code which sends User Attributes to Hotjar using the Identify API
User Attributes are sent from your site to Hotjar using JavaScript, over the Hotjar Identify API. We recommend that this is implemented by a web developer, as it will require that you write additional code in order to implement. Detailed coverage of the Identify API is available in the Identify API Reference Guide.
Step 4: Start using User Attributes in Hotjar!
Once you have enabled User Attributes, and your developer has implemented the code necessary to send data to Hotjar, you will start seeing them appear in the User Attributes management page. You will see a list of all User Attributes that have been send to Hotjar. You are also able to disable User Attributes if needed.
User Attributes also allow you to:
Why can't I do more than target Polls and Incoming Feedback with User Attributes?
In the future, we’re planning for all Hotjar tools to be able to take advantage of User Attributes in some way. You will soon be able to filter Recordings by User Attributes, allowing you to segment Recordings. If you had any ideas about what you’d like to see from User Attributes next, let us know!