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

Goal and regular expressions

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'm trying to set up goal in Google Analytics for several pages using regular expressions. Each page has two parameters in the URL: parameter ID and parameter sent.

For example one page looks like this:

www.example.com/cars/used-cars?id=123&sent

another page looks like this

www.example.com/cars/used-cars?id=426&sent

 

I need to set up Goal for this kind of pages and use regular expressions. How can I do this?

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Pedro C
January 2016

Re: Goal and regular expressions

Top Contributor
# 2
Top Contributor
Hi Pedro C,

You can try this regex:

^\/cars\/used\-cars\?id=[0-9]+&sent

Note the this assumes that the ID can be any number of digits.
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 Pedro C
January 2016

Re: Goal and regular expressions

Top Contributor
# 2
Top Contributor
Hi Pedro C,

You can try this regex:

^\/cars\/used\-cars\?id=[0-9]+&sent

Note the this assumes that the ID can be any number of digits.
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 ✭ ✭ ✭
Great, thanks, it works.

Goal and regular expressions

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Can you help me with this?:

 

/lone/?area=lists;sa=buddies;u=37;add=1;mail=1;send=addBuddy

 

i thing is kind of:

 

^\/lone\/\?area=lists;sa=buddies;u=[0-9]+;add=[0-9]+;mail=1;send=addBuddy

 

am i correct?

 

thanks.