Learn how to use URL patterns to control when and where your content appears in your application
URL pattern matching is a powerful feature in Usertour that helps you control exactly where your content appears. You can use it to:
Note: These URL pattern rules apply to Current page conditions only. For Navigate to page actions, you’ll need to use the full URL and can insert user attributes for dynamic values.
Here are the key rules to remember:
-
as a wildcard to match anything:segment
to match a single dynamic segmentThis matches any domain with exactly this path.
✅ Matches:
https://example.com/app/dashboard
http://example.com/app/dashboard
https://other-example.com/app/dashboard
❌ Does not match:
https://example.com/app
https://example.com/app/dashboard/sub
https://example.com/app/dashboard/sub/page
The *
matches everything (including nothing).
✅ Matches:
https://example.com/app
https://example.com/app/projects
https://example.com/app/projects/1
https://other-example.com/app
https://example.com/applications
❌ Does not match:
https://example.com/settings
Note the /
before the *
.
✅ Matches:
https://example.com/app/projects
https://example.com/app/projects/1
https://other-example.com/app/projects
❌ Does not match:
https://example.com/app
https://example.com/applications
:project
matches any single path segment (anything except /
).
✅ Matches:
https://example.com/projects/1/details
https://example.com/projects/2/details
❌ Does not match:
https://example.com/projects/1/details/edit
https://example.com/projects/1/history
✅ Matches:
https://example.com/app/apple/projects/1
https://example.com/app/banana/projects/1
https://example.com/app/banana/projects/1/details
❌ Does not match:
https://example.com/app/apple/projects
✅ Matches:
https://app.com/
https://app.com/any/path
❌ Does not match:
https://www.app.com/
https://not-app.com/
✅ Matches:
https://www.app.com/
https://www.app.com/any/path
https://dashboard.app.com/
❌ Does not match:
https://app.com/
https://multiple.levels.app.com/
https://www.not-app.com/
✅ Matches:
https://dashboard.example.com/app/apple/projects
https://dashboard.example.com/app/apple/projects/1
Let’s break down a URL into its components:
The part before ://
(usually http
or https
).
The part between ://
and the first /
.
To match dynamic subdomains (e.g. apple.app.com
and banana.app.com
), use a colon and an arbitrary name such as :company.app.com
. :company
will match a non-empty subdomain, meaning it will not include .
. The name after :
does not matter and is currently not used for anything.
:company.app.com
and :subdomain.app.com
are equivalent and will match:
apple.app.com
banana.app.com
They will not match:
app.com
(missing subdomain)more.apple.app.com
(more subdomains)You can also use *
as a wildcard character to match any number of subdomains.
*.app.com
will match both one.app.com
and one.two.app.com
, but not app.com
.
*app.com
will match app.com
, but will also match myapp.com
.
In a URL, the path is the part that comes after the domain and before either the query parameters (starting with ?
) or the fragment (starting with #
).
/
/
(e.g. app/projects
), the system will treat app
as a domain/app/projects
Use :paramName
to match dynamic path segments:
✅ Will match:
/app/apple/projects
/app/banana/projects
❌ Won’t match:
/app/projects
(missing company segment)/app/apple/projects/1
(path too deep)Tip: Parameter names like
:company
or:slug
are just identifiers - you can name them anything, they don’t affect the matching logic
Use *
to match any path:
/app/*
/app/one
, /app/one/two
/app
/app/
/app*
/app
, /applications
app
/*/projects
/app/projects
, /app/one/two/three/projects
You can mix dynamic segments and wildcards in the same pattern:
This pattern will:
The part that comes after ?
and before #
in a URL.
key=value
)&
?fruit=apple&tab=analytics
will match:
?fruit=apple&tab=analytics
?tab=analytics&fruit=apple
(different order, same result)?other=test&fruit=apple&tab=analytics
(extra params ignored)The part that comes after #
in a URL.
Fragments follow the same rules as paths:
Tip: In single-page applications (SPAs), fragments often act like paths and can be matched using the same patterns
Learn how to use URL patterns to control when and where your content appears in your application
URL pattern matching is a powerful feature in Usertour that helps you control exactly where your content appears. You can use it to:
Note: These URL pattern rules apply to Current page conditions only. For Navigate to page actions, you’ll need to use the full URL and can insert user attributes for dynamic values.
Here are the key rules to remember:
-
as a wildcard to match anything:segment
to match a single dynamic segmentThis matches any domain with exactly this path.
✅ Matches:
https://example.com/app/dashboard
http://example.com/app/dashboard
https://other-example.com/app/dashboard
❌ Does not match:
https://example.com/app
https://example.com/app/dashboard/sub
https://example.com/app/dashboard/sub/page
The *
matches everything (including nothing).
✅ Matches:
https://example.com/app
https://example.com/app/projects
https://example.com/app/projects/1
https://other-example.com/app
https://example.com/applications
❌ Does not match:
https://example.com/settings
Note the /
before the *
.
✅ Matches:
https://example.com/app/projects
https://example.com/app/projects/1
https://other-example.com/app/projects
❌ Does not match:
https://example.com/app
https://example.com/applications
:project
matches any single path segment (anything except /
).
✅ Matches:
https://example.com/projects/1/details
https://example.com/projects/2/details
❌ Does not match:
https://example.com/projects/1/details/edit
https://example.com/projects/1/history
✅ Matches:
https://example.com/app/apple/projects/1
https://example.com/app/banana/projects/1
https://example.com/app/banana/projects/1/details
❌ Does not match:
https://example.com/app/apple/projects
✅ Matches:
https://app.com/
https://app.com/any/path
❌ Does not match:
https://www.app.com/
https://not-app.com/
✅ Matches:
https://www.app.com/
https://www.app.com/any/path
https://dashboard.app.com/
❌ Does not match:
https://app.com/
https://multiple.levels.app.com/
https://www.not-app.com/
✅ Matches:
https://dashboard.example.com/app/apple/projects
https://dashboard.example.com/app/apple/projects/1
Let’s break down a URL into its components:
The part before ://
(usually http
or https
).
The part between ://
and the first /
.
To match dynamic subdomains (e.g. apple.app.com
and banana.app.com
), use a colon and an arbitrary name such as :company.app.com
. :company
will match a non-empty subdomain, meaning it will not include .
. The name after :
does not matter and is currently not used for anything.
:company.app.com
and :subdomain.app.com
are equivalent and will match:
apple.app.com
banana.app.com
They will not match:
app.com
(missing subdomain)more.apple.app.com
(more subdomains)You can also use *
as a wildcard character to match any number of subdomains.
*.app.com
will match both one.app.com
and one.two.app.com
, but not app.com
.
*app.com
will match app.com
, but will also match myapp.com
.
In a URL, the path is the part that comes after the domain and before either the query parameters (starting with ?
) or the fragment (starting with #
).
/
/
(e.g. app/projects
), the system will treat app
as a domain/app/projects
Use :paramName
to match dynamic path segments:
✅ Will match:
/app/apple/projects
/app/banana/projects
❌ Won’t match:
/app/projects
(missing company segment)/app/apple/projects/1
(path too deep)Tip: Parameter names like
:company
or:slug
are just identifiers - you can name them anything, they don’t affect the matching logic
Use *
to match any path:
/app/*
/app/one
, /app/one/two
/app
/app/
/app*
/app
, /applications
app
/*/projects
/app/projects
, /app/one/two/three/projects
You can mix dynamic segments and wildcards in the same pattern:
This pattern will:
The part that comes after ?
and before #
in a URL.
key=value
)&
?fruit=apple&tab=analytics
will match:
?fruit=apple&tab=analytics
?tab=analytics&fruit=apple
(different order, same result)?other=test&fruit=apple&tab=analytics
(extra params ignored)The part that comes after #
in a URL.
Fragments follow the same rules as paths:
Tip: In single-page applications (SPAs), fragments often act like paths and can be matched using the same patterns