2.7K members online now
2.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

Goal setting in Google analytics (regular expression?)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



I have a question about setting goals in Google Analytics. I want to set goals for the following three pages:


The first (1) one is the contact page, the second (2) one is a quotation request, the third (3) is also a quotation request, but for a specific product, in this case 'gevelreclame'. So I have a lot of pages who are similar as the third (3) one (with the difference of product name in the URL).


I want to set goals in Google Analytics for all these pages but it doesn't work with what I've tried so far. I've tried: 

  • regular expression: (f302-o1)
  • regular expression: f302-o1

Can anyone tell me what I'm doing wrong? I want to set goals for all webpages.


Thanks in advance.



Goal setting in Google analytics (regular expression?)

Participant ✭ ☆ ☆
# 2
Participant ✭ ☆ ☆

Hi Genya,


Google Analytics ignores(cuts off) the URL # fragments, this is why your goals are not working. 


If you use sub directories or URL query parameters for product names instead of # fragments. You can do this by changing your website's URL structure or you can change the tracked page path with a sub-directory or query parameter by modify your URI path and set it in your Google Analytics pageview command.


ga('send', 'pageview', { 'page': '/contact/wpcf7-f302-o1'}); 


ga('send', 'pageview', { 'page': '/contact?product=wpcf7-f302-o1'});


I hope this helps to solve your problem.