Heatmap Empty After Installing a Cache Plugin? 3 Checks in 60 Seconds

Heatmap Empty After Installing a Cache Plugin? 3 Checks in 60 Seconds

●1 ●4
calendar_today ago • schedule1 min read

Your heatmap is empty, the session counter says zero, and nothing errors. On WordPress, the usual cause is not the analytics tool. It is the cache or performance plugin: it merges, defers or delays JavaScript, and the tracker stops running without a single warning. This applies to every tool in the category (Hotjar, Microsoft Clarity, Matomo, Opti-Behavior or your own beacon).

Open your site in a private window, logged out, and run these three checks in order.

1. Is the script in the HTML?
View source (Ctrl+U, not the Elements tab) and search for your tracker's file name.

  • Not there: the script was never added. Check the plugin is active and that you are not excluded as a logged-in admin.
  • src points to something like /wp-content/cache/min/...: the tracker was merged into a bundle.
  • type is not text/javascript (for example rocketlazyloadscript): the script is delayed until the first interaction.

2. Does the request leave the browser?
DevTools > Network > Fetch/XHR, then click and scroll for ten seconds.

  • No request: the tracker never started.
  • 4xx: often an expired nonce on a page served from cache for too long.
  • 200: tracking works; look at filters or admin exclusion instead.

3. Is the config object defined?
In the console, type your tracker's global config name. undefined while the file is present means the small inline config block was optimised away. Excluding the file is only half the job: the inline block needs its own exclusion rule.

The full guide has the exclusion code for WP Rocket, LiteSpeed Cache, SiteGround Optimizer, Autoptimize, Perfmatters, WP-Optimize, W3 Total Cache, Breeze and Jetpack Boost, plus a clean way to verify the fix:
https://optiuser.com/blog/heatmap-not-working-cache-plugin/?utm_source=coderlegion&utm_campaign=traffic-oct26

Disclosure: written by The Opti-Behavior Team, the publisher of the Opti-Behavior plugin, with the help of AI tools, and reviewed by the team.

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Just completed another large-scale WordPress migration — and the client left this

saqib_devmorph - Apr 7

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

Telemetry: Shared Analytics and Crash Reporting in Kotlin Multiplatform

kmp-bits - Oct 9

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelski - Apr 23
chevron_left
687 Points • 5 Badges
3Posts
0Comments
7Connections
Opti-Behavior is a self-hosted conversion rate optimization (CRO) and behavior analytics plugin for WordPress.

Commenters (This Week)

1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!