Analytics
3.4K members online now
3.4K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Destination Goal with Regular Expression

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to use a regular expression to track goals on multiple pages. 

 

An example of a destination page would be: /PRICE_ThankYou.html?aliId=455612987

 

The regular expression for my destination goal is: .*ThankYou[^/]*html$

 

Is my regular expression correct? Can it simply be *ThankYou.html*

 

Thank you in advance

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Brandon C
March 2016

Re: Destination Goal with Regular Expression

Top Contributor
# 2
Top Contributor
Hi Brandon,

Please try:

^/(.+)_ThankYou.html\?aliId=(.+)$

Let me know if it works.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Brandon C
March 2016

Re: Destination Goal with Regular Expression

Top Contributor
# 2
Top Contributor
Hi Brandon,

Please try:

^/(.+)_ThankYou.html\?aliId=(.+)$

Let me know if it works.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Destination Goal with Regular Expression

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks Arnold,

I ran it through a tester and it looks like it will work. I can't verify until tomorrow though since my first missed conversion was today. I will post back once I can verify.

Tester: http://www.analyticsmarket.com/freetools/regex-tester

Re: Destination Goal with Regular Expression

Participant ✭ ✭ ☆
# 4
Participant ✭ ✭ ☆
If "ThankYou.html" string in URL is specific only for goal completion you can simply define your goal as ThankYou\.html

Re: Destination Goal with Regular Expression

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thanks Tomasz_C, it looks like your solution will work as well.

Destination Goal with Regular Expression

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

What is the beginning of my URL is different for each product page but the end of the URL is the same? What would the Regex be to track thank you page URLs that all end the same? 

 

Example: 

Product 1 = /product-abc-thank-you/

Product 2 = /product-xyz-thank-you/

Product 3 = /product-mno-thank-you/

 

Thanks!