Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm trying to set up Google Analytics to track my e-commerce checkout page. The URLs in the process are as follows:

  1. /checkout/[order number]

  2. /checkout/[order number]/your_details

  3. /checkout/[order number]/review

  4. /checkout/[order number]/complete

I've used the regular expression for the first page (/checkout/[order number]:

/checkout/\d+

That works fine, however the problem is I'm struggling to work out what the regular expression should be for the other pages.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

These should work

/checkout/\d+/your_details
/checkout/\d+/review
/checkout/\d+/complete

I got this from this forum post which helpfully says

To test this regular expression, go to the Top Content Report, scroll to the bottom and enter the regular expression into the text box at the bottom of the table.

See if the filtered results match only pages that you want to consider a goal.

share|improve this answer
    
I had tested the same regular expressions out in a Javascript regex tester but I wasn't getting a match for some reason. They are now working in the Top Content Report search so I should be good to go. Thanks. –  splatio Feb 15 '12 at 8:25
    
I think the regular expressions that Analytics uses aren't the common ones used, and don't even correspond to the Google help pages on regular expressions. According to those \d would mean a literal d, not a decimal number. I think I need to ask a question about that... –  paulmorriss Feb 15 '12 at 9:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.