AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
1.7K members online now
1.7K 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

Tracking goals on dynamic subdomains

Follower ✭ ✭ ✭
# 1
Follower ✭ ✭ ✭

Hi,

 

I am trying to track goals on a dynamic subdomain. As part of my service, customers can create their own custom site URL. For example, John Doe can create jdoe@subdomain.com, Jane Doe could create janedoe.subdomain.com, Tom Jones could create tomjones.subdoamin.com, and so on. On these subdomains I have a confirmation page that is reached when the customer completes an action. For example, if the customer purchases an add-on module, the confirmation page URL would be: jdoe.subdomain.com/billing/confirmation_page

 

I want to track this confirmation page as a conversion or goal across dynamic subdomains, so I set the destination in the Goal Details to operate on a regular expression, but it isn't working. The regular expression I am trying to use is: \.*\.subdomain\.com\/billing/confirmation_page, but it's not working. I believe I am writing the regular expression incorrectly. Can anyone tell me the correct way to write the regular expression?


Thank you in advance for any advice.

 

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Andrew S
June 2017

Tracking goals on dynamic subdomains

Top Contributor
# 2
Top Contributor

Hi Andrew,

 

You might want to try something like this, which ignores basically the hostname (whatever.subdomain.com) and looks at the path instead: .*/billing/confirmation_page

 

and that's it. You don't need to escape the slashes, by the way, due to the type of regex engine used by Google Analytics.

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Andrew S
June 2017

Tracking goals on dynamic subdomains

Top Contributor
# 2
Top Contributor

Hi Andrew,

 

You might want to try something like this, which ignores basically the hostname (whatever.subdomain.com) and looks at the path instead: .*/billing/confirmation_page

 

and that's it. You don't need to escape the slashes, by the way, due to the type of regex engine used by Google Analytics.

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Tracking goals on dynamic subdomains

Follower ✭ ✭ ✭
# 3
Follower ✭ ✭ ✭

Hi Nicky,

 

Thanks so much for taking the time to reply. I've implemented your suggestion and I think it's working. I will keep an eye on it, but so far, so good. Thanks again!

Tracking goals on dynamic subdomains

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi,

 

I'm trying to fix the regular expression goal url, but it doesn't seem to work.

domain.com/app/summary/12345/processed where 12345 is dynamic.

 

 

Tracking goals on dynamic subdomains

Top Contributor
# 5
Top Contributor

Hi, Francis W,

 

Can you send a complete screenshot of your goal configuration? This will help bug troubleshooting.

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn