How to Write RegEx for Google Analytics Goal Tracking ThankYou Page with Unique ID

1.1k Views Asked by At

www.domain.com/home/processform/thankyou?order_id=9653&order_value=mobilebrand as the the final URL for thank you page with unique ID.

^/thankyou$ as RegEx - will this work to count the goal?

3

There are 3 best solutions below

0
On

one can use the below which will only match "/thankyou" or "/thankyou/" in any given URL

regex \/thankyou\/?

0
On

Use this:

regular expression  /thankyou 

as the destination goal.

0
On

If your page values in Google Analytics are formatted the default way, you'll want to use the following regex:

^/thankyou.*

If you use a '$' at the end, it won't detect any of your URLs that have query parameters, like your examples do.