Analytics
2.7K members online now
2.7K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Goal and regular expressions

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have one starting page for my goal, but three different landing pages based on answers from the forms. All of the "thank-you" pages  have the word "success" in them. I have had trouble in the past with goals duplicating if they share a destination and then I realized I was going to quickly run out of goals if I had a separate goal for every single variation. Here is what I am proposing for the goal:

 

Starting Page

/create-cookbook/cookbook-kit/hedua/

 

Destination Pages (depending on answers in form):

/create-cookbook/hedua/mail-success-hedua/

/create-cookbook/hedua/digital-success-fundraiser-hedua/

/create-cookbook/hedua/digital-success-keepsake-hedua/

 

For the destination, I thought to put a simple regular expression:

*success*

 

Will this work? Thank you so much for any advice.

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Valerie V
April 2016

Re: Goal and regular expressions

Top Contributor
# 2
Top Contributor

Hi, Valerie V,

The way you can configure your goal is to use regex matching, as you already indicated. Your steps could be the following:

 

Starting page: 

^\/create-cookbook\/cookbook-kit\/hedua\/$


Destination pages: 

^\/create-cookbook\/hedua\/.*-success-.*

 

The destination page would encompass all string forms that are of the structure: /create-cookbook/hedua/<something>-success-<something>

So the last part of the destination would be any string so long as it has "-success-" in it. A double-edged sword as you would capture not just the intended pages, but possibly other unintended pages (eg. /create-cookbook/hedua/sock-success-kittens). Although it's not very likely that this would happen, you could do things to mitigate that. But try that for now, and if it does capture unintended pages, then you can refine the regex, for example:

^\/create-cookbook\/hedua\/(mail|digital)-success-(hedua|fundraiser-hedua|keepsake-hedua)/$

(which again could be optimised further).

 

 

Hope this helps.

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 Valerie V
April 2016

Re: Goal and regular expressions

Top Contributor
# 2
Top Contributor

Hi, Valerie V,

The way you can configure your goal is to use regex matching, as you already indicated. Your steps could be the following:

 

Starting page: 

^\/create-cookbook\/cookbook-kit\/hedua\/$


Destination pages: 

^\/create-cookbook\/hedua\/.*-success-.*

 

The destination page would encompass all string forms that are of the structure: /create-cookbook/hedua/<something>-success-<something>

So the last part of the destination would be any string so long as it has "-success-" in it. A double-edged sword as you would capture not just the intended pages, but possibly other unintended pages (eg. /create-cookbook/hedua/sock-success-kittens). Although it's not very likely that this would happen, you could do things to mitigate that. But try that for now, and if it does capture unintended pages, then you can refine the regex, for example:

^\/create-cookbook\/hedua\/(mail|digital)-success-(hedua|fundraiser-hedua|keepsake-hedua)/$

(which again could be optimised further).

 

 

Hope this helps.

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

Re: Goal and regular expressions

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
I'm just learning about RegEx. Thank you so much for your insight and help!