On this page
What this issue is
Heatmap and session recording tools such as Hotjar, Microsoft Clarity, Crazy Egg or Lucky Orange work by loading a JavaScript file on your pages. That script then watches clicks, scrolls and mouse movement and sends the data back to the tool. Some tools also record page changes so they can replay a visit.
Why it costs you leads or sales
Slow pages lose visitors before they see your offer, especially on mobile and on paid traffic where people have little patience. A script that blocks rendering delays the first thing a visitor sees. A script that keeps the main thread busy makes buttons and form fields feel stuck right when someone tries to tap them.
- Ad clickVisitor lands on the page
- Heavy script loadsCompetes with content and blocks the main thread
- Page feels slowVisitor waits or taps with no response
- Form submittedFewer visitors get this far
The script delays the page, so some visitors never reach the form.
Example: illustrative numbers showing how extra scripts can add to load time on a landing page. Your own results will differ.
How to check if your site has it
Find the script's size and timing
Open the page in Chrome, press F12, go to the Network tab, tick Disable cache, reload and filter by JS. Look for the heatmap domain (for example hotjar.com or clarity.ms) and note its size and when it starts.
Compare with and without it
Run PageSpeed Insights or Lighthouse on the page. Then block the heatmap domain in DevTools (Network tab, right-click the request, Block request domain) and run Lighthouse again. The difference is the script's cost.
Check the main thread
In the Lighthouse report, open the Reduce the impact of third-party code and Minimize main-thread work audits. See how much blocking time the heatmap domain adds.
Check how it is loaded
View the page source and look for the script tag. A plain script tag in the head with no async or defer attribute can block rendering.
Count your tools
List every recording, heatmap, chat and survey script on the page. Several tools doing similar jobs multiply the cost.
| Sign | What it suggests |
|---|---|
| Script starts early in the Network waterfall | It is loaded in the head or without a delay |
| High blocking time attributed to the tool's domain | It is using the main thread during page load |
| Big drop in score when the domain is blocked | The script is a real part of your slowdown |
| Small or no change when blocked | Look elsewhere first, such as images or other tags |
How to fix it
Work from the cheapest change to the biggest. First load the script later, then limit where and for whom it runs, and finally remove it if you do not use the data.
Use a tag, not hard-coded code
Remove any heatmap snippet pasted into your theme and add it as a Custom HTML tag, or use the tool's template if available in the Tag Gallery.
Change the trigger
Replace the All Pages - Page View trigger with Window Loaded, or a Timer trigger of a few seconds, so it starts after the page is usable.
Limit pages
Add a trigger condition on Page Path so the tag runs only on the pages you want to study.
Respect consent
Under Advanced Settings, Consent Settings, require the right consent type so it does not run before permission.
Check how it is added
Look in the heatmap plugin settings, your theme's header scripts area, or a header and footer plugin.
Move it to the footer or delay it
If the snippet is in the header, move it to the footer. If you use a performance plugin (for example WP Rocket or similar), look for a delay JavaScript execution option and add the heatmap domain.
Limit pages
Some plugins let you exclude pages. Otherwise load the tool through Google Tag Manager with a page condition.
Find the source
Check Online Store, Themes, Edit code for the snippet in theme.liquid, and check Apps for a heatmap app embed.
Move or remove it
Move a hard-coded snippet to just before the closing body tag, or add it through Google Tag Manager with a delayed trigger. Turn off app embeds you no longer use under Customize, App embeds.
Keep checkout in mind
Checkout pages have restrictions on custom scripts depending on your plan, so check which pages the tool actually runs on.
Find the code
Open Project settings, Custom code, and check Head code and Footer code, plus any page-level custom code.
Move to the footer
Put the snippet in Footer code instead of Head code, and publish.
Limit pages
Move it from the site-wide area to the custom code area of only the pages you want to study.
Load it after the page is ready
Inject the vendor snippet after the window load event or after a short idle period, as in the code example below.
Use the vendor's snippet
Keep the exact loader code your vendor gives you. Only change when it runs, not what it contains.
function loadHeatmap() {
// Paste your vendor's loader snippet here, unchanged.
}
window.addEventListener('load', function () {
if ('requestIdleCallback' in window) {
requestIdleCallback(loadHeatmap, { timeout: 4000 });
} else {
setTimeout(loadHeatmap, 2000);
}
});Sample fewer visitors
Most tools let you cap daily sessions or recording percentage in the project settings. You rarely need every visit to see patterns.
Run it on key pages only
Keep it on the landing pages and form pages you are studying. Remove it from pages nobody reviews.
Drop duplicate tools
If two tools both record sessions, keep one.
Turn off features you do not use
Surveys, feedback widgets and recordings can add code. Disable what you do not look at.
Remove it when the study is done
If you installed it for a short test, take it out once you have your answers.
How to confirm it's fixed
- The heatmap request now starts after the page's main content in the Network waterfall.
- Lighthouse or PageSpeed Insights shows lower blocking time for the tool's domain than before.
- The tool still records new sessions on the pages you chose (check its dashboard after a test visit).
- Your key forms and buttons respond straight away on a mobile test.
- Ad and analytics tags still fire on the page.
Before
- Script sits in the head with no delay
- Runs on every page and every visitor
- Several recording tools at once
After
- Loads after the page is usable
- Runs on chosen pages with a session cap
- One tool, only the features you use
How to prevent it happening again
- Keep a list of every third-party script, who owns it and why it is there.
- Add new tools through Google Tag Manager with a reviewed trigger, not pasted into the theme.
- Re-run PageSpeed Insights on key landing pages after adding any script.
- Review installed tools every quarter and remove ones nobody opens.
- Set a session cap when you set up a new recording tool.
How FunnelGuard handles this
FunnelGuard detects this only partly. During its scheduled runs it performs a page weight check on the pages in your journeys, so it can show when a page grows heavier, for example after someone adds a new script.
Questions people ask
Does Hotjar slow down my website?
It can, but usually only a little when it loads asynchronously. The cost grows if it is in the head without a delay, runs on every visitor, or sits alongside other tools. Measure it with Lighthouse with and without the Hotjar domain blocked.
Does Microsoft Clarity affect page speed?
Any recording script adds some download and processing work, and Clarity is no exception. The size of the effect depends on your page and setup. Test it by comparing Lighthouse results with the clarity.ms domain blocked and unblocked.
How do I find out which script is slowing my page?
Run PageSpeed Insights or Lighthouse and open the third-party code and main-thread work audits. They list blocking time by domain. You can also check the Network tab in Chrome DevTools to see which scripts are large or start early.
How do I load a heatmap script without slowing the page?
Load it after the page is usable. In Google Tag Manager use a Window Loaded or timer trigger, or in code run the vendor snippet after the load event. Also limit it to the pages you study and cap the share of sessions recorded.
Should I remove my heatmap tool to improve speed?
Not necessarily. First delay it, limit it to key pages and sample fewer visitors. Remove it if you do not look at the data or the tests show it is a major part of the slowdown.
Can a heatmap tool hurt my conversion rate?
Indirectly, yes. If it makes a page slow to appear or slow to respond, some visitors leave or struggle with forms. The effect is often small, so measure it on your own pages before deciding.
Can FunnelGuard tell me if my heatmap script is slowing my site?
Only partly. FunnelGuard checks page weight on your journey pages, which can reveal a page getting heavier. It does not measure the script's runtime cost, so use Lighthouse or PageSpeed Insights for that.
Related issues
- TRK-238Hotjar script missing or wrong site IDFix guide
- 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-248Two analytics tools disagreeing on conversion countsFix guide
- TRK-243Mixpanel / Amplitude / Segment events missingFix guide