List of cookies set by the Hotjar Tracking Code
The following cookies, local and session storage items apply when the Hotjar Tracking Code has been loaded and ensure the Hotjar Tracking Code functions correctly. Mentions of site_id refer to the unique ID allocated to an individual site when it is created in Hotjar.
In order for Hotjar features and tools to function correctly, all the items below should be allowed.
Relating to the user |
Name |
Data storage type |
Description |
_hjSessionUser_{site_id} |
Cookie |
- Set when a user first lands on a page.
- Persists the Hotjar User ID which is unique to that site. Hotjar does not track users across different sites.
- Ensures data from subsequent visits to the same site are attributed to the same user ID.
- 365 days duration.
- JSON data type.
|
_hjHasCachedUserAttributes |
Cookie |
- Enables us to know whether the data set in _hjUserAttributes Local Storage item is up to date or not.
- Session duration.
- Boolean true/false data type.
|
_hjUserAttributesHash |
Cookie |
- Enables us to know when any User Attribute has changed and needs to be updated.
- 2 minutes duration, extended every 30 seconds.
- Content hash data type.
|
_hjUserAttributes |
Local storage item |
- Stores User Attributes sent through the Hotjar Identify API.
- No explicit expiration.
- Base64 encoded JSON data type.
|
hjViewportId |
Session storage item |
- Stores user viewport details such as size and dimensions.
- Session duration.
- UUID data type.
|
hjActiveViewportIds |
Local storage item |
- Stores user active viewports IDs.
- Stores an expirationTimestamp that is used to validate active viewports on script initialisation.
- JSON data type.
|
Relating to the session |
Name |
Data storage type |
Description |
_hjSession_{site_id} |
Cookie |
- Holds current session data.
- Ensures subsequent requests in the session window are attributed to the same session.
- 30 minutes duration, extended on user activity.
- JSON data type.
|
_hjCookieTest |
Cookie |
- Checks to see if the Hotjar Tracking Code can use cookies. If it can, a value of 1 is set.
- Deleted almost immediately after it is created.
- Under 100ms duration, cookie expiration time set to session duration.
- Boolean true/false data type.
|
_hjLocalStorageTest |
Cookie |
- Checks if the Hotjar Tracking Code can use Local Storage.
If it can, a value of 1 is set.
- Data stored in _hjLocalStorageTest has no expiration time, but it is deleted almost immediately after it is created.
- Under 100ms duration.
- Boolean true/false data type.
|
_hjSessionStorageTest |
Cookie |
- Checks if the Hotjar Tracking Code can use Session Storage. If it can, a value of 1 is set.
- Data stored in _hjSessionStorageTest has no expiration time, but it is deleted almost immediately after it is created.
- Under 100ms duration.
- Boolean true/false data type.
|
_hjTLDTest |
Cookie |
- We try to store the _hjTLDTest cookie for different URL substring alternatives until it fails.
- Enables us to try to determine the most generic cookie path to use, instead of page hostname.
- It means that cookies can be shared across subdomains (where applicable).
- After this check, the cookie is removed.
- Session duration.
- Boolean true/false data type.
|
Relating to Feedback and Survey tools |
Name |
Data storage type |
Description |
_hjClosedSurveyInvites |
Cookie |
- Set when a user interacts with a Link Survey invitation modal.
- Ensures the same invite does not reappear if it has already been shown.
- 365 days duration.
- List of Survey IDs, URL encoded.
|
_hjDonePolls |
Cookie |
- Set when a user completes an on-site Survey.
- Ensures the same Survey does not reappear if it has already been filled in.
- 365 days duration.
- List of Survey IDs, URL encoded.
|
_hjMinimizedPolls |
Cookie |
- Set when a user minimizes an on-site Survey.
- Ensures that the Survey stays minimized when the user navigates through your site.
- 365 days duration.
- List of Survey IDs, URL encoded.
|
_hjShownFeedbackMessage |
Cookie |
- Set when a user minimizes or completes a Feedback widget.
- Ensures the Feedback widget will load as minimized if the user navigates to another page where it is set to show.
- One day duration.
- Boolean true/false data type.
|