URL Targeting
Choose the pages an experiment runs on with page rules — six attributes, six operators, and/or joins, and worked examples for pages, sections and exclusions.
URL targeting is how you tell Split Test Pro which pages an experiment runs on. You set it on the Targeting step of the experiment wizard, under the first question, 01 Where should this test run? Each row is one page rule; you can stack rules to match several patterns or carve out exceptions.
A rule reads as a sentence: Attribute, Operator, Value — for example Path starts with /products/. Type the value, then click Save rule. Add another rule adds a row. Launch Test needs at least one saved rule (the launch check reads a saved page rule); to run on every page, use Path starts with /.
You can change rules while the test is a Draft or Paused; pause a running test to change targeting.
The attributes
The first dropdown picks which part of the page address (or where the visitor came from) the rule checks:
| Attribute | What it matches | Example value |
|---|---|---|
| Page URL | The complete address: protocol, hostname, path, query string and hash. | https://shop.example.com/products/widget?ref=email |
| Path | The path after the hostname, leading slash included. No query string, no hash. | /products/widget |
| Hostname | Just the domain. | shop.example.com |
| Query parameter | The query string, without the leading ?. Empty when the address has none. |
utm_source=email |
| Hash | The #… part of the address, leading # included. Empty when there is none. |
#reviews |
| Referrer | The hostname of the page that sent the visitor here, in lower case. Empty when there is no referrer. | google.com |
For most experiments you want Path — it identifies the page within your site, independent of domain and query parameters.
Split Test Pro’s own preview parameters are stripped before a rule is checked, so opening a preview link never changes what Page URL or Query parameter see.
The operators
The second dropdown picks how the value is compared:
| Operator | What it does |
|---|---|
| is | The attribute equals the value exactly. |
| is not | The attribute is anything other than the value. |
| contains | The value appears anywhere in the attribute. |
| does not contain | The value does not appear anywhere in the attribute. |
| starts with | The attribute begins with the value. |
| ends with | The attribute ends with the value. |
Comparisons are exact and case-sensitive: /Products/Widget is not /products/widget. The one exception is Referrer, which is always lower case, so write its value in lower case too.
Worked examples
A single product page
Attribute: Path
Operator: is
Value: /products/your-product
This matches only that exact path. /products/your-product?ref=email matches (the query string isn’t part of Path); /products/your-product/ with a trailing slash does not.
All product pages
Attribute: Path
Operator: starts with
Value: /products/
The trailing slash in the value is intentional — it stops the rule matching /products (the index page) or /products-old.
Every page in a section
Attribute: Path
Operator: contains
Value: /collections/winter
Matches /collections/winter, /collections/winter-jackets, /de/collections/winter — anything containing that text.
Anchor links to a section
Attribute: Hash
Operator: is
Value: #reviews
Use this when the same page shows different content depending on the anchor. Include the leading # in the value.
Targeting is checked when the page loads, not when the hash changes. If a visitor lands on /page and then clicks an in-page link to #reviews, the experiment won’t run until the next full page load.
Just the home page
Attribute: Path
Operator: is
Value: /
The home page’s path is /. is / matches only the home page; starts with / matches every page on your site.
Email traffic only
Attribute: Query parameter
Operator: contains
Value: utm_source=email
Query parameter sees the whole query string, such as utm_source=email&utm_medium=newsletter, so contains finds one parameter among several.
Visitors arriving from Google
Attribute: Referrer
Operator: is
Value: google.com
is matches the referring hostname exactly. Google usually sends visitors from www.google.com, so ends with google.com catches both forms. The referrer is whatever page sent the visitor to this one — including another page of your own site.
Everywhere except checkout
Rule 1: Path does not contain /checkout
One rule is enough: an experiment whose only rule is a “not” rule runs on every page that rule allows.
Combining multiple rules
From the second row on, each rule starts with an and / or dropdown that joins it to the rule above. New rows start as and.
- and — both rules must hold.
- or — either side is enough.
- and binds tighter than or, the same way multiplication comes before addition. Rules are read top to bottom as groups joined by and, separated by or: A and B or C means (A and B) or C.
Product pages, but only for email traffic:
Rule 1: Path starts with /products/
Rule 2: and Query parameter contains utm_source=email
Widget or gizmo pages — change the join to or, or the experiment would need a path that starts with both:
Rule 1: Path starts with /products/widget
Rule 2: or Path starts with /products/gizmo
Every product page except one:
Rule 1: Path starts with /products/
Rule 2: and Path is not /products/sold-out
Checking a page
The Targeting step has no match indicator. To check a page, set the Preview URL on the Variants step and use Copy preview link — see Screenshots and Preview. The preview bar on your site shows a status badge: Active when the page passes the URL and device targeting, or Inactive URL, Inactive Device or Inactive URL & Device when it doesn’t. The pattern that works:
- Define your rules.
- Open a preview on a page where the experiment should run and confirm the badge reads Active.
- Browse, still in preview, to a page where it should not run and confirm the badge reads Inactive URL.
The preview ignores audience rules, so an Active badge says nothing about which visitors are eligible.
What URL targeting doesn’t do
- It doesn’t check device type — that’s device targeting, the next question on the same step.
- It doesn’t check visitor type, traffic source, browser, operating system, language, session count, landing page or UTM campaign — those are audience rules.
- It doesn’t check logged-in status, cart contents, or geo — audience rules offer none of them either; use a JS variant that runs the check and conditionally fires a custom event.
- It doesn’t re-check on SPA route changes without a full page load — see Single-Page Apps.
Common mistakes
- Forgetting the leading slash.
Path is products/widgetnever matches (paths always start with/). Use/products/widget. - Putting a domain in Path.
Path is https://example.com/widgetnever matches. Use Page URL to match the whole address. - Trailing slash mismatches. Some platforms add a trailing slash, some don’t. Use starts with instead of is to be tolerant.
- Targeting
/with starts with. Every path starts with/, so this matches the whole site. Use is for the home page only. - Leaving the join on and. Two include rules joined by and must both hold. If you meant “either page”, switch the second row to or.
Next steps
- Restrict the experiment to some devices: Device Targeting.
- Choose which visitors are eligible: Audience Targeting.
- Open a page with your variant applied: Screenshots and Preview.
- Avoid stepping on another experiment’s targeting: Running Multiple Experiments.