URL Match goals fire when visitors reach specific pages. Perfect for tracking thank you pages, confirmations, and content views.
When to Use URL Goals
Best for tracking:
- Thank you pages after forms
- Purchase confirmation pages
- Registration complete pages
- Specific content pages
- Download confirmation pages
Creating URL Match Goals
Go to Goals
Go to Goals and click New Goal
Select URL Match
Choose "URL Match" as the goal type
Enter URL Pattern
Enter the URL or pattern to match
Choose Match Type
Select how the URL should match
Configure Options
Set name, value, and other settings
Save
Click "Create Goal"
Match Types
Exact Match
Matches the exact path only.
| Setting | Value |
|---|---|
| Match Type | Exact |
| Pattern | /thank-you |
| Matches | example.com/thank-you |
| Doesn't match | example.com/thank-you/order |
Use for: Specific single pages
Contains
Matches if URL contains the pattern.
| Setting | Value |
|---|---|
| Match Type | Contains |
| Pattern | thank |
| Matches | /thank-you, /thanks, /thankyou |
Use for: Variations of same page type
Starts With
Matches URLs beginning with pattern.
| Setting | Value |
|---|---|
| Match Type | Starts with |
| Pattern | /blog/ |
| Matches | /blog/post-1, /blog/category/news |
| Doesn't match | /about/blog |
Use for: Sections of your site
Ends With
Matches URLs ending with the pattern.
| Setting | Value |
|---|---|
| Match Type | Ends with |
| Pattern | /success |
| Matches | /payment/success, /signup/success |
| Doesn't match | /success/details |
Use for: Pages sharing a common suffix
Regular Expression
Matches using regex patterns.
| Pattern | Matches |
|---|---|
/order/\d+ | /order/123, /order/456789 |
\.(pdf|doc)$ | Files ending in .pdf or .doc |
^/products?/ | /product/ or /products/ |
Use for: Complex matching needs
URL Components
What Gets Matched
| Component | Example | Matched? |
|---|---|---|
| Path | /thank-you | Yes |
| Query params | ?ref=email | Optional |
| Hash | #section | Optional |
| Domain | example.com | No (not needed) |
Path Only Matching
Most common approach:
- Just match the path
- Ignore query parameters
- Works across most scenarios
Including Query Parameters
When you need specific params:
| Pattern | Matches |
|---|---|
/success?source=paid | Only paid conversions |
checkout.*utm_campaign=spring | Spring campaign |
Common Examples
E-commerce
| Goal | Pattern | Type |
|---|---|---|
| Purchase complete | /order/confirmation | Exact |
| Any order page | /order/ | Starts with |
| Cart page | /cart | Exact |
Lead Generation
| Goal | Pattern | Type |
|---|---|---|
| Contact form thanks | /contact/thank-you | Exact |
| Any form completion | thank-you | Contains |
| Demo scheduled | /demo/confirmed | Exact |
Content Sites
| Goal | Pattern | Type |
|---|---|---|
| Article read | /blog/ | Starts with |
| Guide download | /guides/ | Starts with |
| Premium content | /premium/ | Starts with |
SaaS
| Goal | Pattern | Type |
|---|---|---|
| Signup complete | /welcome | Exact |
| Trial activated | /dashboard | Exact |
| Upgrade success | /upgrade/success | Exact |
Handling Variations
Multiple Thank You Pages
If you have multiple confirmation pages:
Option 1: Use Contains
- Pattern:
thankmatches all
Option 2: Create multiple goals
- Goal 1:
/contact/thanks - Goal 2:
/signup/thanks
Option 3: Use Regex
- Pattern:
/(contact|signup)/thanks
Dynamic URLs
For URLs with dynamic segments:
| URL Type | Regex Pattern |
|---|---|
/order/12345 | /order/\d+ |
/user/john-doe | /user/[\w-]+ |
/product/blue-widget-2 | /product/[\w-]+ |
Query Parameter Handling
Ignoring Parameters
Default behavior ignores query params:
/thank-youmatches/thank-you?ref=email- Simplest approach for most cases
Matching Specific Parameters
Track specific campaign conversions:
/thank-you.*utm_source=facebook
Matches: /thank-you?utm_source=facebook&utm_medium=social
Parameter-Based Goals
Create different goals per parameter:
- Goal 1:
utm_source=google→ "Google Conversion" - Goal 2:
utm_source=facebook→ "Facebook Conversion"
Case Sensitivity
Default Behavior
URL matching is case-insensitive:
/Thank-Youmatches/thank-you
Force Case Sensitive
If needed, use regex:
^/thank-you$ (exact, case-sensitive in most regex engines)
Single Page Apps (SPAs)
SPA URL Tracking
For SPAs with client-side routing:
- Zenovay tracks route changes
- Works with React Router, Vue Router, etc.
- Hash-based and history-based routing supported
Configuration
SPA tracking is built-in. Zenovay automatically detects route changes via the History API (pushState, replaceState, popstate). No additional configuration needed.
Virtual Pageviews
Some SPAs need manual tracking:
// When route changes
zenovay('page');
Troubleshooting
Goal Not Triggering
Check pattern:
- Test URL pattern matches actual URL
- Check for typos
- Verify match type
Check page:
- Is tracking installed on that page?
- Does page load in analytics?
Test manually:
- Visit the URL yourself
- Check real-time view
Wrong Pages Matching
If too many pages match:
- Make pattern more specific
- Use Exact match instead of Contains
- Add more path context
Pages Not Found
If pages aren't matching:
- Use Contains for flexibility
- Check for trailing slashes
- Verify regex syntax
Best Practices
Be Specific
| Bad | Good |
|---|---|
thank | /checkout/thank-you |
success | /signup/success |
Test Before Launch
- Create goal
- Visit the page
- Verify in real-time
- Check goal count
Document Your Goals
Keep track of:
- Goal name
- URL pattern
- Match type
- What it measures