URL Targeting allows you to specify the pages to run the experiments. URL Targeting helps in targeting a particular or a group of URLs with the options specified.
URL Targeting Section
Use Include URLs and Exclude URLs to specify pages to include in, or exclude from the target group.
- Simple Match- This is the default match type and targets a page on your site. This URL match type ignores query parameters and string fragments.
- Exact Match- This URL match type includes query strings and fragments. The URL should be identical to the one specified.
- Regex- Regular expression or regex is used to target multiple and complicated URLs by providing a pattern to match the URLs.
- Substring- Matches all pages that contain the specified substring or text.
Let’s explore in detail and understand the different URL match types
This is the default match type and is used for targeting a single page site. The experiment runs on a particular page when the URL specified is matched.
Simple match ignores the following parts in the URL:
Hash or Anchor tags
Protocol and trailing slashes (http, https)
Presence/Absence of WWW in the URL
Let us consider the URL: http://test.com
Simple match considers the following:
- File extensions (.html, .php,etc.)
Exact match matches the URL exactly with the target URL.
The Experiment runs only if the exact match of the URL gets hit.
An exact match doesn’t ignore any part of the URL
The exact match may come in handy when you need to exclude a page with a particular query or hashtag(anchor tags)
URL: Simple Match: http://test.com
Exclude URL (Exact Match): http://test.com?query=false
Substring option consists of two parts.
Base domain represents the base URL of the website.
To provide the actual base domain name, select Domain is from the subtype.
To provide a keyword present in the base domain, select Domain contains from the subtype.
Contains represents the substring to search for in URL leaving the base URL.
All marketing campaigns have UTM trackers associated with this. Substring match helps in filtering out one particular campaign and run the experiment on that page.
This will help in identifying the specific campaigns’ insights into the data.
URL: Domain is - http://test.com Substring - app
NOTE: To properly utilize and take advantage of regex, knowledge on how it works is required. Your webmaster can help you set up a regular expression, based on your requirements.