Pro Plan5 minutesbeginner

URL Match Goals

Track conversions when visitors reach specific pages - thank you pages, confirmation pages, and specific content.

goalsurlpagesconversions
Last updated: January 15, 2025
Pro Plan

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

1

Go to Goals

Go to Goals and click New Goal

2

Select URL Match

Choose "URL Match" as the goal type

3

Enter URL Pattern

Enter the URL or pattern to match

4

Choose Match Type

Select how the URL should match

5

Configure Options

Set name, value, and other settings

6

Save

Click "Create Goal"

Match Types

Exact Match

Matches the exact path only.

SettingValue
Match TypeExact
Pattern/thank-you
Matchesexample.com/thank-you
Doesn't matchexample.com/thank-you/order

Use for: Specific single pages

Contains

Matches if URL contains the pattern.

SettingValue
Match TypeContains
Patternthank
Matches/thank-you, /thanks, /thankyou

Use for: Variations of same page type

Starts With

Matches URLs beginning with pattern.

SettingValue
Match TypeStarts 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.

SettingValue
Match TypeEnds 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.

PatternMatches
/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

ComponentExampleMatched?
Path/thank-youYes
Query params?ref=emailOptional
Hash#sectionOptional
Domainexample.comNo (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:

PatternMatches
/success?source=paidOnly paid conversions
checkout.*utm_campaign=springSpring campaign

Common Examples

E-commerce

GoalPatternType
Purchase complete/order/confirmationExact
Any order page/order/Starts with
Cart page/cartExact

Lead Generation

GoalPatternType
Contact form thanks/contact/thank-youExact
Any form completionthank-youContains
Demo scheduled/demo/confirmedExact

Content Sites

GoalPatternType
Article read/blog/Starts with
Guide download/guides/Starts with
Premium content/premium/Starts with

SaaS

GoalPatternType
Signup complete/welcomeExact
Trial activated/dashboardExact
Upgrade success/upgrade/successExact

Handling Variations

Multiple Thank You Pages

If you have multiple confirmation pages:

Option 1: Use Contains

  • Pattern: thank matches 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 TypeRegex 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-you matches /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-You matches /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

BadGood
thank/checkout/thank-you
success/signup/success

Test Before Launch

  1. Create goal
  2. Visit the page
  3. Verify in real-time
  4. Check goal count

Document Your Goals

Keep track of:

  • Goal name
  • URL pattern
  • Match type
  • What it measures

Next Steps

Was this article helpful?