TemperStack
Intermediate8 min readUpdated Mar 18, 2026

How to exclude pages from tracking on Hotjar

Quick Answer

You can exclude pages from Hotjar tracking by using URL targeting rules in your site settings to specify which pages should not be tracked. This involves setting up exclusion patterns or using the Hotjar API to disable tracking on specific URLs.

Prerequisites

  1. Active Hotjar account with admin access
  2. Hotjar tracking code installed on your website
  3. Knowledge of URL patterns and regex basics
  4. Understanding of your website's page structure
1

Access your Hotjar dashboard

Log into your Hotjar account and navigate to the Sites & Organizations section. Select the website where you want to exclude pages from tracking.
Tip
Make sure you have admin or owner permissions for the site you want to modify.
2

Navigate to site settings

Click on the Settings tab in the left sidebar, then select Site Settings from the dropdown menu. This will open the configuration panel for your tracking setup.
3

Configure URL targeting rules

Scroll down to the URL Targeting section. Click on Add Rule and select Exclude from the dropdown. Enter the URL pattern or specific URLs you want to exclude from tracking using wildcards (*) or regex patterns.
Tip
Use wildcards like '/admin/*' to exclude entire sections or specific patterns like '*/checkout' for checkout pages.
4

Set up exclusion patterns

For each page or section to exclude, create a new rule with the appropriate pattern:
  • */admin/* - excludes all admin pages
  • */login - excludes login page
  • */private/* - excludes private sections
Click Add Rule for each exclusion pattern you need.
Tip
Test your patterns carefully to ensure you're not accidentally excluding pages you want to track.
5

Configure recording and heatmap exclusions

Go to the Recordings and Heatmaps sections separately. For each tool, click on Settings and then URL Targeting. Apply the same exclusion rules or create tool-specific exclusions as needed.
Tip
You can set different exclusion rules for recordings vs heatmaps if you want different tracking behavior.
6

Implement JavaScript exclusions (optional)

For dynamic exclusions, add JavaScript code to your excluded pages:
window.hj=window.hj||function(){(hj.q=hj.q||[]).push(arguments)};
hj('event', 'disable_tracking');

Place this code before the standard Hotjar tracking script on pages you want to exclude.
Tip
This method is useful for pages where URL patterns aren't sufficient or for conditional exclusions.
7

Save and verify settings

Click Save Changes to apply your exclusion rules. Navigate to one of your excluded pages and check the browser's developer console. You should not see Hotjar tracking requests being made to the excluded URLs.
Tip
Use your browser's Network tab in Developer Tools to verify that Hotjar requests are not being sent from excluded pages.
8

Test exclusion effectiveness

Wait 24-48 hours and then check your Hotjar dashboard to confirm that data from excluded pages is no longer appearing in your recordings, heatmaps, or other tracking reports. Review the Site Activity section to verify the exclusions are working.
Tip
Keep a list of excluded URLs for future reference and team members who might need to understand the tracking setup.

Troubleshooting

Exclusion rules not working immediately
Hotjar exclusion rules can take up to 24 hours to fully propagate. Clear your browser cache and wait for the changes to take effect before testing.
Wildcard patterns excluding too many pages
Refine your URL patterns to be more specific. Use /admin/dashboard/* instead of /admin/* if you only want to exclude dashboard pages, not all admin pages.
Some tracking data still appearing from excluded pages
Check if you have multiple Hotjar tracking codes installed or if there are cached versions. Also verify that your exclusion patterns exactly match the URL structure of your pages.
Unable to exclude dynamic URLs with parameters
Use regex patterns in your exclusion rules or implement JavaScript-based exclusions for pages with complex URL structures or query parameters.

Related Guides

More Hotjar Tutorials

Other Tool Tutorials

Ready to get started with Hotjar?

Put this tutorial into practice. Visit Hotjar and follow the steps above.

Visit Hotjar