AdWords
3.1K members online now
3.1K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

Ecom final goal tracking with URL containing dynamic ids

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hi,

 

I am trying to set-up a goal to track the payment success path in Google Analytics but I think I am making some error in the settings. Below is my settings details, please help me understand where am I making mistake?

 

- Destination field contains:

Begins with: .*/checkout/*/complete*  (complete URL of this destination looks like: "www.xyz.com/checkout/1018894/complete". The number between the URL changes dynamically whenever someone makes a transaction.)

 

- Funnel Set-up:

1. Display Cart- /cart (complete URL- www.xyz.com/cart)

2. Checkout Entry- .*/checkout/* (complete URL- www.xyz.com/checkout/1018894)

3. Checkout Review- .*/checkout/*/review* (complete URL- www.xyz.com/checkout/1018894/review)

4. Payment Entry- .*/checkout/*/payment* (complete URL: www.xyz.com/checkout/1018894/payment)

 

 

Please advise.

 

Thanks,

Kundan

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Kundan
September 2015

Re: Ecom final goal tracking with URL containing dynamic ids

Top Contributor
# 2
Top Contributor
Hi Kundan,

Looks like you are using regular expressions to define the steps of the funnel. You are close, but a little off. Regular expressions in the sales funnel are tough. First thing I see is the /'s (slashes) need to be escaped with a \ (backslash), otherwise it's seen as a delimiter rather than a character to match. Next thing is all the asterisks (*) need to be preceded with a period (.). Now, all URL's need to be relative to the base directory, no domain name.

Let's give it a try:

Funnel Set-up:

1. Display Cart- /cart (complete URL- www.xyz.com/cart)
If a regular expression, should be \/cart
2. Checkout Entry- .*/checkout/* (complete URL- www.xyz.com/checkout/1018894)
Should be \/checkout\/.{7}$
3. Checkout Review- .*/checkout/*/review* (complete URL- www.xyz.com/checkout/1018894/review)
Should be \/checkout\/.{7}\/review
4. Payment Entry- .*/checkout/*/payment* (complete URL: www.xyz.com/checkout/1018894/payment)
Should be \/checkout\/.{7}\/payment

I have assumed the id is 7 characters wide. One of the difficult parts of your setup is that \/checkout\/.* will pickup the 2nd, 3rd, and 4th step. That's the reason for the length of 7. You could also use a digit indicator. That would look like this:

\/checkout\/\d*$

This says match any number of digits to the end of the line. If alpha characters are after the id in the URL, it won't match.

For the remaining steps:

\/checkout\/\d*\/review
\/checkout\/\d*\/payment

It should work, but always takes me a little experimenting to get it right.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Kundan
September 2015

Re: Ecom final goal tracking with URL containing dynamic ids

Top Contributor
# 2
Top Contributor
Hi Kundan,

Looks like you are using regular expressions to define the steps of the funnel. You are close, but a little off. Regular expressions in the sales funnel are tough. First thing I see is the /'s (slashes) need to be escaped with a \ (backslash), otherwise it's seen as a delimiter rather than a character to match. Next thing is all the asterisks (*) need to be preceded with a period (.). Now, all URL's need to be relative to the base directory, no domain name.

Let's give it a try:

Funnel Set-up:

1. Display Cart- /cart (complete URL- www.xyz.com/cart)
If a regular expression, should be \/cart
2. Checkout Entry- .*/checkout/* (complete URL- www.xyz.com/checkout/1018894)
Should be \/checkout\/.{7}$
3. Checkout Review- .*/checkout/*/review* (complete URL- www.xyz.com/checkout/1018894/review)
Should be \/checkout\/.{7}\/review
4. Payment Entry- .*/checkout/*/payment* (complete URL: www.xyz.com/checkout/1018894/payment)
Should be \/checkout\/.{7}\/payment

I have assumed the id is 7 characters wide. One of the difficult parts of your setup is that \/checkout\/.* will pickup the 2nd, 3rd, and 4th step. That's the reason for the length of 7. You could also use a digit indicator. That would look like this:

\/checkout\/\d*$

This says match any number of digits to the end of the line. If alpha characters are after the id in the URL, it won't match.

For the remaining steps:

\/checkout\/\d*\/review
\/checkout\/\d*\/payment

It should work, but always takes me a little experimenting to get it right.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

Re: Ecom final goal tracking with URL containing dynamic ids

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆
Thanks a lot Pete... I will make changes in my settings according to your suggestions and let you know how is it going.

Pete, can you please send me a good reference where I can learn the basics of Regex. I find it very much complex and all the resources I have found on the net differs from one another.

Thanks,
Kundan

Re: Ecom final goal tracking with URL containing dynamic ids

Top Contributor
# 4
Top Contributor
Hi Kundan,

Google regular expressions are similar to C and Perl. None of the Posix extensions are recognized. Stick to the basics and you should be ok.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords