On this page
What this issue is
Hotjar is a tool that shows heatmaps (where people click and scroll) and session recordings (replays of visits). It works through a small script on your pages. The script contains a site ID, set as hjid, which tells Hotjar which of your sites the data belongs to.
This issue means one of three things: the script is not on the page at all, it is on some pages but not others, or it is there with an ID that belongs to a different site (an old staging site, a client's project, or a typo).
Why it costs you leads or sales
Hotjar does not bring in leads by itself, so the direct impact is low. The cost is indirect: you make design and copy decisions without the evidence you think you have. A form that confuses people, or a button that is hard to tap on mobile, stays hidden because the recordings are empty.
A wrong ID is worse than a missing script. Data can flow into another project, so you may read the wrong site's heatmaps, or an agency may mix up two clients.
- Visitor landsPage loads normally
- Hotjar scriptMissing or wrong hjid
- RecordingNever starts
- HeatmapStays empty
A missing or wrong site ID breaks the chain at the first step.
How to check if your site has it
Find your real site ID
In Hotjar, open the Sites & Organizations list (or Settings, then Sites). Note the numeric Site ID of the site you want to track.
View the page source
Open your page, right-click, choose View Page Source, and search for
hotjarorhjid. Compare the number with your Site ID.Check in the browser console
Open DevTools, go to Console, and type
typeof hj. If it returnsfunction, the script loaded. Typewindow._hjSettingsto see thehjidin use.Check the Network tab
Reload with the Network tab open and filter for
hotjar. You should see a request tostatic.hotjar.comfor a file containing your ID, and no blocked or failed requests.Test key pages
Repeat on the homepage, a landing page, the form page, the checkout and the thank-you page. Scripts are often missing on pages that use a different template.
Use Hotjar's own check
In Hotjar, open the site's installation settings and use the Verify installation option, then load your site in another tab.
How to fix it
Copy the snippet from Hotjar (Sites, then your site, then installation instructions) so the ID is correct. The standard tracking code looks like this, with your own number in place of 1234567:
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:1234567,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>Find where it is installed
Check your Hotjar plugin settings, any header and footer scripts plugin, and your theme's header options. Look for more than one place holding an old ID.
Correct or paste the ID
Replace the ID or paste the snippet into the head section once. Remove duplicates.
Clear caches
Purge your caching plugin and CDN so visitors get the updated page.
Open theme code
Go to Online Store, Themes, Edit code, and open
theme.liquid.Fix the snippet
Paste the Hotjar code just before
</head>or correct thehjid. Also check Settings, Customer events, for a custom pixel holding it.Check checkout pages
Theme code does not run on every checkout page. Hotjar there depends on your plan and Shopify's checkout settings, so verify it rather than assume.
Open the Hotjar tag
In your container, find the Hotjar tag (Custom HTML or the Hotjar template) and check the Site ID.
Check the trigger
Make sure it fires on All Pages, or on the pages you want, and is not blocked by a consent condition you did not intend.
Preview, then publish
Use Preview to confirm the tag fires, then Submit and publish the container.
Open custom code
Go to Project settings, Custom code, and look in Head code.
Fix and publish
Paste or correct the snippet, save, and publish the site. Page-level custom code can also hold an old copy.
Add to the right place
For funnels, open the funnel settings and add the snippet in the Head tracking code. For websites, use the site's settings. Page-level code can override it.
Save and republish
Save the changes and view the live page to confirm.
Use Custom Code
Go to Settings, Custom Code (under Advanced), and edit the Hotjar entry, or use Hotjar's app if you installed it that way.
Set the placement
Apply it to all pages in the Head, then publish. Custom code needs a paid plan with a connected domain.
Open code injection
Go to Settings, Advanced, Code Injection, and check the Header box.
Correct the ID
Paste the right snippet and save. Code injection needs a plan that supports it.
Edit the shared head
Add the snippet to the shared layout or head partial so every page gets it once.
Check environments
Store the ID in an environment variable so staging and production use different IDs.
How to confirm it's fixed
typeof hjreturnsfunctionin the console on each key pagewindow._hjSettings.hjidmatches your Site ID in Hotjar- The Network tab shows
static.hotjar.comloading with no errors - Hotjar's Verify installation reports the site as connected
- A test visit appears in Recordings after a few minutes (allow for your plan's sampling and limits)
- Only one Hotjar script loads per page
How to prevent it happening again
- Keep one documented install method and one owner for it
- Record the correct Site ID for each client or environment
- Re-check after theme changes, redesigns, migrations and GTM publishes
- Use separate Hotjar sites for staging and production
- Look at Hotjar's recent recordings weekly; a gap is the first sign of trouble
How FunnelGuard handles this
FunnelGuard does not check for this yet. A Hotjar script check is a possible future addition, but today it is not built, so FunnelGuard will not tell you if the Hotjar ID is wrong.
To watch for a Hotjar problem, use a manual routine: check the Recordings list in Hotjar weekly, use Hotjar's Verify installation after site changes, and add a Hotjar check to your launch checklist. A free FunnelGuard plan covers 1 site and 2 journeys with daily checks, no card needed.
Broken
- No script on some templates
- Old or staging ID in the code
- Empty heatmaps and no recordings
Fixed
- One snippet with the correct ID on every page
- Verify installation passes
- Recordings appear within minutes
Questions people ask
Why is Hotjar not recording my website?
The usual causes are a missing script, a wrong site ID, a cookie banner or ad blocker stopping it, or a plan limit on sessions. Check the page source for hjid, compare it with your Site ID in Hotjar, and test in a clean browser.
How do I find my Hotjar site ID?
Open Hotjar and go to the Sites list or Settings, then Sites. Each site shows a numeric Site ID. The same number appears as hjid in the tracking code.
How do I check if Hotjar is installed correctly?
Use Hotjar's Verify installation option while your site is open in another tab. You can also type typeof hj in the browser console, which should return function, and check that window._hjSettings.hjid matches your ID.
Can Hotjar work with the wrong site ID?
The script will load, but data goes to whichever Hotjar site owns that ID, so your own project stays empty. This often happens after copying code from a staging or another client's site.
Why does Hotjar show no data in Google Tag Manager?
Check that the tag has the right Site ID, that its trigger fires on the pages you expect, and that no consent setting blocks it. Use Preview mode, then publish the container, as unpublished changes do not go live.
Does FunnelGuard check if Hotjar is installed?
No. A Hotjar check is a possible future feature, but it is not built yet. FunnelGuard does monitor your funnels, tracking hits to ad and analytics platforms, and test lead delivery.
How long until Hotjar recordings show up after fixing the script?
Usually within a few minutes of a test visit, though it depends on your plan's sampling and limits. If nothing appears after a while, re-check the ID and that only one script loads.
Related issues
- TRK-239Microsoft Clarity missing or wrong project IDFix guide
- TRK-240Session recording capturing form fields (PII in recordings)Fix guide
- TRK-241Session recording loading before consentFix guide
- TRK-242Heatmap tool slowing page (heavy script)Fix guide
- TRK-248Two analytics tools disagreeing on conversion countsFix guide
- TRK-243Mixpanel / Amplitude / Segment events missingFix guide