regexgoogle-analyticsgoal-tracking

Google Analytics Goal Regex URL


I'm kind of new to regular expressions and can't figure out what the regular expression for this Google Analytics Goal URL should be.

The URL

examplesite.com/order/898/card

Should be considered the same as

examplesite.com/order/card

But not the same as

examplesite.com/order/898/delivery

So basically I want the regular expression for the URL

examplesite.com/order/*card

and

examplesite.com/order/*delivery

Etc.

I've Googled for something like this, but regular expressions for me are still al little to difficult.


Solution

  • Try this:

    examplesite.com/order/(\d+/)?card
    

    Description

    Regular expression visualization