TapCub is live — analytics, insights and live chat, free on one platform
Glossary

Dynamic heatmap: tracking clicks on menus modals and single-page apps

A dynamic heatmap stays accurate when a page changes after load. Why a static screenshot misplaces clicks on menus, dialogs and SPA routes, with a click-count example and a way to audit your own map.

Su He Reviewed by Ethan Brooks Also called dynamic website heatmap Last updated Dec 3, 2026 Glossary

Quick answer

A dynamic heatmap is a website heatmap that stays accurate when the page changes after loading. It ties clicks to the element or page state where they happened, so clicks on menus, modals, tabs and single-page app views are not painted over unrelated content on one static screenshot.

What is a dynamic heatmap?

A dynamic heatmap is a website heatmap built to stay accurate when the page changes after it loads. Menus open, dialogs appear, tabs swap content, banners push everything down and single-page apps replace the whole view without a page load. A dynamic heatmap ties each click to the element or page state where it happened, instead of painting every click onto one fixed picture.

The ordinary heatmap stacks click coordinates on a background image. That works well on a page that looks the same to everyone. It fails quietly on a changing page: the colors still look convincing, but some of them sit on top of content the visitor never clicked.

The phrase has other meanings. In mapping software, a "dynamic" heat map recalculates density colors as you zoom or pan, and charting tools use it for a heat map that redraws when you pick a filter. This page is about web behavior analytics.

Why a static screenshot misplaces clicks

A click is recorded at a position. The browser can report it relative to the whole document (pageY) or to the visible window. Neither number says what was under the pointer at that moment. If the background picture was taken in a different state, the position points at the wrong thing.

Page behaviorWhat the screenshot showsWhat goes wrong
Dropdown or flyout menuMenu closedClicks on options land on whatever lies underneath
Modal dialogPage without the dialogClose and submit clicks scatter across the page body
Tabs and accordionsOnly the default panelClicks from every panel pile onto one
Late banner or personalized blockOne variant, or noneEverything below it shifts, producing two hot spots for one button
Responsive layoutOne widthThe same button sits at different positions on other screens
Single-page app route changeThe first viewClicks from later views are mixed in unless each URL is treated as its own page

Coordinate, element and state-based heatmaps

MethodHow a click is placedHandles wellWeak spot
Coordinate-basedBy x and y on a backgroundStatic pages; clicks on non-interactive areasAnything that moves or appears later
Element-basedBy identifying the clicked element, then drawing or listing it wherever it isMoved buttons, menu items, layout differences between screensElements whose IDs or classes are generated anew on each build
State-basedSeparate backgrounds for each state, such as menu open or modal shownSeeing a dialog or menu as the visitor saw itSomeone has to define and capture the states
Live overlayDrawn over the running pageChecking the current layout, not an old captureSites can refuse to be framed, and the state still has to be reproduced

Tools combine these in different ways, and some call any of the last three "dynamic". When you evaluate a tool, ask what it does with a click on a menu item that was hidden when the background was captured.

Worked example: a product page with a size menu

Sample data: a product page records 4,000 clicks. A size menu sits above a block of description text. Visitors opened the menu 1,240 times. In 1,180 of those they picked a size; in the other 60 they clicked the menu button again and closed it.

ElementClicksOn a closed-menu screenshotIn an element-based view
Size menu button (1,240 opens + 60 closes)1,300On the buttonSize menu button
Option S190On the description textOption S
Option M420On the description textOption M
Option L370On the description textOption L
Option XL200On the description textOption XL
All other elements1,520In placeIn place
Total4,0001,180 clicks misplacedNone assigned to the text

The screenshot suggests that visitors keep clicking a paragraph that does nothing, which reads like a dead click problem. A designer might turn the text into a link. In fact 1,180 clicks, or 29.5% of all clicks on the page, belong to the menu.

The element view also answers questions the picture cannot. M takes 420 of 1,180 selections (35.6%) and L 370 (31.4%). Of 1,240 opens, 60 (4.8%) ended without a choice.

Layout shifts cause the second classic error. Suppose a promotion banner 80 pixels tall appears for 40% of visitors, and the add-to-cart button, 48 pixels tall, gets 900 clicks. About 540 are recorded at one height and 360 about 80 pixels lower, further than the button is tall. A coordinate map shows two blobs, one of them off the button; an element view shows one button with 900 clicks.

Single-page apps and route changes

Single-page apps change what is on screen with the History API. Calling pushState updates the address without loading a new document, so a recorder that only starts fresh on page load will keep filing clicks under the first URL. Check three things:

  1. Each route is its own page. Clicks after a route change must be recorded with the new path.
  2. Similar URLs are grouped. /product/18 and /product/27 share a template and usually belong on one map, such as /product/:id.
  3. Hash routes are not ignored. Apps that route with #/ often need a setting so that the part after # counts.
ToolUnitQuestion it answers
Click mapMany visitors, click positionsWhich areas of this page get clicked?
Scroll mapMany visitors, depth reachedHow far down do people get?
Dynamic heatmapMany visitors, elements and statesWhich controls get clicked, including ones that appear only after an action?
Session replayOne visit, in time orderWhat did this person see and do just before and after?
AI heatmapNo visitors; a model's predictionWhere might attention go on a design not yet live?

Scroll data has its own version of the problem: on a page that keeps loading more items, document height keeps changing, so "50% depth" does not mean the same place for everyone.

How to check a heatmap you already have

  1. Open the page yourself and list everything that is hidden at first: menus, dialogs, tabs, accordions, filters.
  2. Look for heat over plain text, images or empty margins. Compare each spot with your list of hidden controls.
  3. Open the element list. If a control that never appears in the background has many clicks, the picture is not showing the whole story.
  4. Split by device. Mixing phone and desktop layouts creates hot spots that match neither.
  5. Check the dates. Clicks from before a redesign drawn on the new page are another form of the same error.

Decision rule: if a conclusion depends on a click position near anything that moves or opens, confirm it in the element list or in a few recordings before you change the design.

Common mistakes

  • Fixing a dead area that is not dead. Check hidden menus first.
  • Selectors that change on every release. Give important controls a stable ID or attribute so their history stays together.
  • Building controls from plain boxes. A script-only div may not be recognized as clickable by a collector. Use real buttons and links.
  • Reading two blobs as two behaviors. It may be one button in two layouts.
  • Pooling too many URLs. Grouping by template helps only when the pages share a layout.

Heatmaps for changing pages in TapCub

Take the product page above. TapCub builds heatmaps from autocapture, which needs the Pro plan or higher:

Heatmap element click share table listing page elements with their clicks and share of all clicks
Demo data: clicks listed by element, a view that does not depend on what the background picture shows.
  1. Turn on collection. Enable autocapture under Web analytics › Configuration › SDK code, and switch on scroll depth if you want the scroll map. Apps with hash routing add data-hash="true" to the script tag.
  2. Open the page template. In All-platform analytics › Behavior › Heatmaps, pages are merged by path template, so product pages share a row such as /product/:id. Pick a device before reading anything.
  3. Read the map with care. The click map plots positions: horizontally as a share of viewport width, vertically in page pixels. You can overlay the live page or capture a snapshot at desktop or mobile width. A snapshot shows the page as it opens, so expect the size options not to be in it.
  4. Switch to Elements. This tab lists the most clicked controls with their share, visitors and average position, so each size option that is a real button or link shows up as a control and not as heat on a paragraph. Only clickable elements are recorded.
  5. Watch a few visits if needed. Session replay is a separate feature and is off by default; when enabled, it shows the menu opening in context.

TapCub does not draw a separate background for each menu or dialog state. Where a conclusion rests on a hidden control, use the element list rather than the colors.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is the difference between a static and a dynamic heatmap?

A static heatmap draws all clicks on one captured image of the page. A dynamic heatmap accounts for change, by tying clicks to elements, keeping separate page states or drawing over the running page. The difference matters wherever content is hidden at load or moves afterward.

Why do clicks appear on blank space in my heatmap?

Usually the background was captured in a different state from the one visitors saw. A closed menu, a missing dialog, a banner that shifted the layout or another screen width can all leave clicks floating over text or margins. Compare the spots with the element list.

Do single-page apps work with heatmaps?

Yes, if the collector records the new path when the route changes through the History API, and treats hash routes as paths where the app uses them. Without that, clicks from later views are filed under the first URL and drawn on its screenshot.

Can a heatmap show clicks inside a modal?

It can count them if the buttons in the modal are recognized as clickable elements. Drawing them in place needs a background in which the modal is open, either a captured state or a live page where you open it. A list by element works either way.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics