What’s the difference between Heatmap URL and Heatmap Session filters?
URL filtering allows you to select what URLs you want to see Heatmap data for, and then Session filters allow you to select what Sessions that Heatmap data is pulled from. For example, a date range, visitor country, operating system and more.
To explore Session filters, check out What are Heatmap Session Filters?
You can view Heatmap data for a single page or a group of pages. When viewing a Heatmap for a group of pages, you’ll only see one screenshot, but the data that appears over the screenshot will be aggregated from all matching pages.
There are six URL filtering options that you can choose from:
- URL is: This is the default match type and is used to target a specific page on your site. This match type ignores any query strings and fragments that might get added and the presence or not of 'www'.
- URL is exactly: Displays data from users who visited a specific URL, including the protocol and any query strings and fragments.
- URL contains: Displays data for all URLs which contain the entered text. This rule is case sensitive.
- URL starts with: Displays “Exact match” results for all URLs that begin with the entered text, including the protocol.
- URL ends with: Displays “Exact match” results for all URLs that end with the entered text, including strings and fragments.
- URL matches regex: Displays results for all URLs that match with the entered RE2 compatible pattern
URL is
This is the default match type that allows you to view a Heatmap for a specific page on your site. The match will be correct if the URL path that users land on matches the URL path you specify.
If query strings or fragments are added to the URL when the page loads, the Single page match type will still be tracked. Any added query strings or fragments will be ignored.
URL is - https://www.x.com/pages/
URL is exactly
The match will be correct if the URL path, query-string, and fragment that users land on match EXACTLY the ones you specify.
URL is exactly - https://www.x.com/pages/?x=1
URL contains
The match will be correct if the URL that users land on includes the text you specified.
URL contains - ?x=1
URL starts with
The match will be correct if the URL that users land on starts exactly as you specify it, including the protocol.
URL starts with - https://www.x.com/pages/
URL ends with
The match will be correct if the URL that users land on ends exactly as you specify it.
URL ends with - pages/
Result | Example URL |
✔️ Match | https://www.x.com/pages/ |
❌ NO MATCH | https://www.x.com/pages/subpage |
❌ NO MATCH | https://www.x.com/pages/?x=1 |
❌ NO MATCH | https://www.x.com/pages/?x=1&y=1 |
❌ NO MATCH | https://www.x.com/pages/?x=1#2 |
Hotjar can only support the following characters
a-z, A-Z,0-9, -, ., _, /, and ~. Any other characters need to be percent-encoded.
Regular Expression (REGEX)
Regex can be really helpful to aggregate insights across multiple pages of your site with regex queries that match specific URL patterns. The match will be correct if the URL matches the entered pattern.
Our Heatmap REGEX filter uses the RE2 flavor
This is the same flavor used by Google Analytics, but it doesn't allow for URL exclusions.
You can test REGEX code at regex101.com using the Golang flavor in the lefthand menu and enter different URLs in the TEST STRING field to make sure they will match.
Regular Expression examples (* indicates a variable portion of the URL)
Target | Example REGEX |
www.example.com/pages/* |
www\.example\.com\/pages\/(.+) |
www.example.com/pages/*/article | www\.example\.com\/pages\/(.+)\/article |
example.com/products/*, but not example.com/products/*/page or example.com/products/*/otherpage | \/products\/(.+)\/$ |