Hotjar Is Tracking the Wrong Pages: How to Fix Page Targeting Problems
When Hotjar is tracking the wrong pages, recordings or heatmaps capture pages you did not intend. The cause is usually the URL targeting rules, query parameters, dynamic URLs, single-page application behavior or page templates. Page targeting is rule-based, so a wrong rule captures the wrong pages.
Table of Contents
- 01.How page targeting works
- 02.What to check first
- 03.Match types and rule scope
- 04.Query parameters and dynamic URLs
- 05.Single-page applications
- 06.Page templates and heatmaps
- 07.How to test the fix
- 08.How to validate the final result
How page targeting works
Hotjar uses URL targeting rules to decide which pages to track for recordings and heatmaps. The rules can match exact URLs, simple match, starts with, ends with, contains or regular expressions. A wrong rule captures unintended pages or misses intended ones. The diagnosis is to compare the rule with the actual URLs the site uses.
| Cause | What happens | How to check |
|---|---|---|
| Wrong match type | Rule matches too broadly or narrowly | Review the match type for each rule |
| Query parameters | URLs with parameters match or miss | Check how parameters are handled |
| Dynamic URLs | URLs change without a full reload | Check SPA or dynamic routing behavior |
| Page templates | Rule matches a template too broadly | Confirm the rule scope |
| Trailing slash | URL with and without slash differ | Compare exact URLs |
What to check first
- List the URLs you intend to track and the URLs you are capturing instead.
- Review the match type for each targeting rule.
- Check how query parameters are handled in the rules.
- Confirm whether the site uses dynamic URLs or SPA routing.
- Compare the exact URLs including trailing slashes.
Match types and rule scope
The match type determines how broadly a rule applies. An exact match captures only one URL. A contains match captures every URL with a substring, which can be too broad. A starts with or ends with match captures a range of URLs. Review the match type for each rule and confirm it captures the intended pages and not more. A rule that is too broad captures unrelated pages.
Query parameters and dynamic URLs
Query parameters change the URL without changing the page. A rule that ignores parameters captures the same page with different parameter strings. A rule that includes parameters may miss the page when the parameter is absent. Decide whether parameters matter for your targeting and configure the rule accordingly. Dynamic URLs that change through JavaScript can also confuse targeting, because the URL in the address bar may not match the URL Hotjar evaluates.
Single-page applications
Single-page applications update the URL through routing without a full page reload. Hotjar may evaluate the URL once on load and not detect subsequent route changes, or it may detect them depending on the implementation. Confirm how your SPA updates the URL and whether Hotjar tracks route changes. This varies by implementation, so test the actual behavior rather than assuming.
Page templates and heatmaps
For heatmaps, a page template that shares a URL pattern can cause a heatmap to capture the wrong variant. A product page template, for example, may share a URL structure across many products. Confirm the heatmap target matches the specific page you want, not the whole template. Heatmap collection problems are covered in the guide on Hotjar heatmap not collecting data.
How to test the fix
- 1.Update the targeting rules to match the intended URLs.
- 2.Visit an intended page and confirm it is captured.
- 3.Visit an unintended page and confirm it is no longer captured.
- 4.For SPAs, confirm route changes are tracked as expected.
How to validate the final result
Page targeting is correct when recordings and heatmaps capture only the intended pages, unintended pages are excluded and SPA route changes behave as expected. If the rules are correct but the wrong pages still appear, the site URL structure or SPA routing is the cause, not the rules.
Frequently Asked Questions
Why is Hotjar tracking pages I did not target?
A targeting rule is too broad. A contains or starts with match can capture unintended pages. Review the match type for each rule and compare it with the actual URLs the site uses. Narrow the rule to match only the intended pages.
Does Hotjar track single-page application route changes?
It depends on the implementation. SPAs update the URL through routing without a full reload. Confirm how your SPA updates the URL and whether Hotjar detects route changes. Test the actual behavior rather than assuming, because it varies by setup.
Need help applying this to your business?

PPC, Conversion Tracking, CRM and Automation Specialist. Helping businesses generate qualified leads with Google Ads, accurate tracking and automated follow-up.
Related Guides
Hotjar Recordings Not Showing: Common Tracking and Session Problems
Recordings can be missing even when tracking is installed, because of consent, sampling, page targeting or browser restrictions. Distinguish a tracking problem from a capture problem first.
Hotjar Heatmap Not Collecting Data: How to Troubleshoot It
A heatmap that stays empty usually fails on the page URL target, traffic volume, dynamic page behavior or consent. Confirm the URL matches the target and the page gets enough matching sessions.
Hotjar Tracking Not Working: What to Check First
When Hotjar tracking does not work, the cause is the tracking code, page coverage, consent, a website change or browser behavior. Confirm the code is present and loading before debugging anything deeper.