This article helps identify issues you might come across with a heatmap's data, such as having no click or scroll activity, and offers some possible solutions. See our Heatmap Screenshot Troubleshooting article for troubleshooting related to the screenshot appearing underneath your heatmap's data.
- Why does my heatmap have no data at all?
- Why is my heatmap missing some click data?
- Why does my heatmap seem to be missing some user sessions?
Why does my heatmap have no data at all?
If a heatmap doesn't have any data, there are a few things to check:
Is the Hotjar Tracking Code installed on the page?
Visit the live URL for your heatmap.
Open your browser's developer tools.
- In Google Chrome, on the menu bar, click View > Developer > Developer Tools.
- In Firefox, on the menu bar, click Tools > Browser Tools > Web Developer Tools.
Click on the Network tab.
Type hotjar in the Filter field and then refresh the page.
If the Tracking Code is installed correctly on your page, you'll see a Hotjar script with your Site ID in the title. For example, hotjar-1234567.js.
If you're not seeing this, the Tracking Code might not not installed on your page, and Hotjar cannot collect data.
Are session capture settings limiting your data collection to a specific page or event?
Session capture can be targeted to a specific page or event, resulting in data collection only happening when users land on that page or when the event triggers. Follow these steps to check for this:
Visit your Sites & Organizations page.
Click on the site settings gear icon to visit the site settings page.
Click on the Session targeting & tracking section on your site settings page.
Check to see if Start capturing sessions on specific pages or when a custom event fires is selected.
If you didn't intend to select this, an Admin team member can unselect it and click Save Changes. After some time, depending on your site traffic, you should then see data appearing on your heatmap.
If you intend to capture sessions for a specific page or event, ensure any URL targeting matches the same URL seen in the address bar of visitors to that page. To test this, visit the same page in an incognito window. See if there are any URL redirections or differences between what you see in the address bar and the targeting you have set. A heatmap cannot capture clicks if the targeting does not match the URL your users are seeing.
If using events to trigger session capture, also check that the event has the opportunity to be triggered on the live page for the heatmap you're viewing.
Are site security issues preventing data collection?
Sometimes, your site might be blocking Hotjar, and you'll need to add Hotjar's IPs to your allow list. Another way your site blocks Hotjar is due to the Content Security Policy set on your site's pages. You can see if there are any Content Security Policy issues by following our article on Content Security Policies. For both of these, your web development team will need to make the changes required for Hotjar to work on your site.
Why is my heatmap missing some click data?
If your heatmap is missing click data on elements, here are some things to check:
Is your page using dynamic IDs or classes?
For example, if a user clicks on an element that looks like this: <button id="button-a87dfuhd">Click!</button>, Hotjar reports that a click happened on button#button-a87dfuhd. If you're using dynamic IDs, the ID for this button will change throughout the day.
This can cause an issue because when the heatmap screenshot was created, and a copy of the HTML elements was recorded at that time, the element may have had a different ID than when a user clicks on it. This results in clicks not being mapped correctly to their matching page elements.
Add the below attribute to the element with dynamic IDs/classes or to any parent that contains such elements. The effects will trickle down to any descendants of this element. The attribute enables Hotjar to rely on tags to track usage and ignore any classes and/or IDs the element and all its children might have.
For example, let's assume you have a list of the top 3 best sellers on your page and a heatmap screenshot records these elements and their IDs. However, these are dynamic IDs and change throughout the day, resulting in user clicks not correctly matching the elements that were recorded. Adding the attribute mentioned earlier will fix this problem:
<div id="best-sellers" data-hj-ignore-attributes> <div id="item-4264"> <!-- Article title + Description --> </div> <div id="item-7764"> <!-- Article title + Description --> </div> <div id="item-3531"> <!-- Article title + Description --> </div> </div>
Are event handlers added by other scripts capturing and blocking the propagation of events?
Sometimes event handlers added by other scripts will capture and block the propagation of events, preventing Hotjar from receiving them. To capture click data, Hotjar needs to be able to receive mouse-down events.
Common sources of this problem are event handlers that use event.stopPropagation(); or jQuery event handlers which return false, which triggers this same event.stopPropagation(); behavior.
We recommend reaching out to your web development team to see if they can remove or fix event-blocking scripts on your site.
Why does my heatmap seem to be missing some user sessions?
Heatmap data can be captured when the Hotjar Tracking Code is correctly installed and session capture settings for your site are configured as intended. Hotjar should capture sessions for the majority of your site's visitors within your Observe plan's session limits. Aside from your plan's session limits, other variables affect user session capturing. These include a user's specific browser settings, any extensions installed by users that block Hotjar, and security or technical restrictions limiting Hotjar's access.
To help you understand why Hotjar might not capture all your site's visitors, see our article Does Hotjar Track All Your Users?