Targeting by Advanced URL with Regular Expressions

The "Where should this survey appear?" area allows you to control what portions of your site have the ability to fire the survey. There are two options: Simple URL and Advanced URL, which is controlled with regular expressions. This article covers the Advanced URL option.

The Advanced URL feature is powered by regular expressions. This option allows you to target a range of URLs that dynamically change based on the content, can be used to exclude portions of your website, focus on traffic coming from a specific ad campaign, etc. This feature is currently only available to our Startup, Growth, Turbo Growth and Enterprise plans

What is a Regular Expression?

A Regular Expression is a simple and concise "phrase" that is used to match a specific subset of things. You can use them at Qualaroo to target surveys to a specific group of pages, without having to list them all individually.

Technical definition: From the Wikipedia Article --

In computing, a regular expression (abbreviated regex) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. 

Each character in a regular expression is either understood to be a metacharacter with its special meaning, or a regular character with its literal meaning. Together, they can be used to identify textual material of a given pattern, or process a number of instances of it that can vary from a precise equality to a very general similarity of the pattern. 

What can Regular Expressions be used for?

Common use cases include targeting visitors using a promo code, and dynamic pages, and excluding areas of your site from being targeted. Below are a few examples:

What are the three area in the Advanced URL field?

  1. Subdomain: This field is anything that comes before your main domain, like, or We do consider "www" to be a subdomain. Regular expression patterns can be entered into this area. This field is optional, and can be left blank.
  2. Top-Level Domain: This is the main URL of your site, and it is required.
  3. Path: This part is where most of the regular expression is added. 

I'm not familiar with regular expressions. Do you have a guide?

We do! Please see How to write Regular Expressions for URL targeting. This guide is available on our Help Center broken up by sections, and as a PDF for download and later reference.

Will you write my regular expression for me?

We don't offer professional services, such as survey creation, design, or writing regular expressions. Our guide, How to write Regular Expressions for URL targeting, is all inclusive and there's a RegEx validator within this area to help you check your work. Our support team can help with troubleshooting if a RegEx isn't validating in a way you expect. 

What kind of regular expressions are supported?

We use the JavaScript version of regular expressions. This information could potentially be useful if you use a different kind of JavaScript in your website, but most websites use the standard version.

Have more questions? Submit a request
Powered by Zendesk