With Mouseflow, you can target pages using regular expressions. Regular expressions or "regex" for short, are patterns that can be used to match characters, strings, parameters, and many other combinations. Regex gives you the ability to define page rules for paths that may contain unique parameters.
In Mouseflow, you can use regex in your website settings, both in the Recording Controls and in the Advanced Settings (you can also use regex to define page rules in a Feedback Campaign).
Using Regex in Mouseflow to Target Pages.
Using the links provided below, let's say you want to target pages that contain the path titled "product".
To do this, you start by adding .* and then you can enter the keyword you want to match on.
The regex with the operators included should appear like so:
Note: This can be used on URLs that contain paths or parameters that change, as long as the path is enclosed in two forward slashes, for example:
Now let's say you want to include two URL paths or "subfolders" (please see link examples below).
Using the links above, if you want to target "/products/software/", you can do so by adding the operators like so:
Using Regex to Exclude Pages in Mouseflow.
With regex, you have the ability to exclude certain paths. Using the following links, let's say you want to exclude pages that include the path "/pricing".
You can do this by adding the following operators:
Note: It's very important that you DO NOT add multiple instances of the exclusion regex (^((?!\/pricing\/).)*$) described above! if you need to exclude multiple Paths using regex please follow the guide below.
Using Regex to Exclude Multiple Pages in Mouseflow.
If you want to exclude multiple URLs from being recorded, you can use Regex. For example, if you wanted to exclude both pages that include the path "/product" and "/pricing".
you would need to add the below as a single entry like this