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

Regular Expression Goals

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

If I want a regular expression goals to trigger only when 2 separate words are in the URL what do I change

 

(\W|^)(sofas|brand name)(\W|$)

 

The URL I want to capture is something like this www.store.com/furniture/sofas/sleeper-sofas/brand-name

 

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Daniel G
November 2015

Re: Regular Expression Goals

Top Contributor
# 2
Top Contributor
Hi Daniel,

Please try this:

(\W|^)(sofas.+brand-name)(\W|$)

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 Daniel G
November 2015

Re: Regular Expression Goals

Top Contributor
# 2
Top Contributor
Hi Daniel,

Please try this:

(\W|^)(sofas.+brand-name)(\W|$)

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: Regular Expression Goals

Rising Star
# 3
Rising Star
Hey Daniel, how are things?

Addind to Arnold's, you can try and test your regular expressions following the guide on this page:
https://support.google.com/analytics/answer/2936903?hl=en

Hope this helps.

Leandro Martinez | Basta1Click

Re: Regular Expression Goals

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Arnold I have another questions:
Say I want to track a large variety of pages, product pages, is there a regular expression goal I could use to capture any page view to any of those pages. Ex - /furniture/dining-room-furniture/formal-tables/D697-35/
The final number is a product number. That number could be a large variety of numbers or letters. The rest of the URL is always the same. Any suggestions?