Hotjar User Attributes is a Tag Template for Google Tag Manager (Web). This is an unofficial Template for Hotjar User Attributes, and not made by Hotjar. Hotjar do not provide any support for this Template.
This Template is available in the Google Tag Manager Template Gallery.
If selected, User Attributes will only be collected for Users with a User ID. You must input your own User ID with this setting. See Hotjar FAQ about handling User IDs.
If User Attributes are missing on some part of the site, but User ID is available, User ID will still be collected.
If selected, User Attributes (if available) will be collected for all Users, whether they have a User ID or not.
Do not collect PII (Personal Identifiable Information) as User Attributes unless you have a User ID. See I have sent Personally-Identifying Information about anonymous users (null value User IDs) to Hotjar. What can I do?.
Type in User Attribute Name(s) and select User Attribute Value(s) from the Variable dropdown.
User Attributes must be filled out.
This Tag should always be triggered after the Hotjar Tag. One way is to add this Tag as a Cleanup Tag to your Hotjar Tag as shown in the image. The User Attributes Tag is named Hotjar User Attributes - CT in the image (CT is an abbreviation for Custom Template).
If you are using this Tag on a SPA site (Single Page Application), Hotjar recommends that you make an Identify API call on every route.
Translated to this Tag, this means that every change that happens on the site that may update/change User Attributes should trigger the Hotjar User Attribute Tag. That could be a History Change Event, Login Event, Signup Event and more.
If you test the Hotjar User Attributes Tag in Google Tag Manager Preview/Debug Mode, you may experience to see a failure message as shown below. No User Attributes will be collected if the Tag fails/shows a failure message.
If you have selected to only track Users with a User ID, and you are previewing without a User ID (you aren't logged into the site), you will get the failure message.
If you have selected to track all Users (also those without a User ID), and you are previewing when no User Attributes are available on the page, you will get the failure message.
Hotjar is informed about this Template, but as mentioned, Hotjar do not provide any support in using this Template. Permission to use the Hotjar logo in the Template have been granted from Hotjar.