What do the rule types for heatmap and session recording mean?
When setting up a heatmap or session recording, you can configure several rules to define on which pages these features should be enabled.
To define one or multiple rules, you first need to choose which value your rule should be based on, for example Address, Path and Address Parameter. When the URL is, for example, https://www.example.com/blog/2017/01/?page=1&limit=10, Address is the same as the full URL, Path is equivalent to /blog/2017/01/ and an Address Parameter can match page or limit.
You can now select how your expected value should be matched. You have several options, for example:
- Simple Equality - This comparison is only valid for URLs, but not for URL paths or parameters. When comparing the URL to the expected value, it will ignore the URL protocol, all search parameters, a wwwsubdomain, and a trailing slash. This means that the URL above would also match e.g. http://example.com/blog/2017/01 because the protocol (HTTP or HTTPS) may be different, www.subdomain is ignored and any URL parameters like page or limit are also ignored. are ignored in the comparison. If your page uses both HTTP and HTTPS, or if you have the same page available in different URL parameters and want to match them all, this is typically a good choice.
- Exactly the same - In this case the rule will only be activated when the URL visited is exactly https://www.example.com/blog/2017/01/?page=1&limit=10. The rule would not activate when the URL starts, for example, with http://, or when the URL has different or no URL parameters;
- Contains - This comparison allows you to test whether the value contains a certain value. If you want to match, for example, all blog pages for the year 2017, you can define a rule where the URL or path contains blog/2017;
- Starts with - When you select this comparison, the value must start with this value. For example, you might want to match all URLs that start with https://www.example.com/blog/. Since the comparison is performed exactly, it would not match when someone visits http://www.example.com/blog/(HTTP instead of HTTPS);
- Match Regular Expression - Regular expressions offer the most flexibility, but they are also the most challenging. Regular expressions are usually defined by developers and allow you to match a value pretty much any way you want.
Note that all comparisons are case insensitive. This means that a value matches a rule regardless of whether the domain is written, for example, www.Example.com or www.example.com.
For all comparisons there is also a counterpart available that allows a certain value to be excluded. For example, You can ensure that a given value does not start with a specific value by selecting Does not start with.
We know it can be challenging to create these “rules,” and you can often use multiple comparisons to get the same thing. To make defining rules easier, the user interface includes a tool to help you easily validate whether a given rule actually does what you had in mind or not.