Analytics
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
star_border
Reply

Goal setting in Google analytics (regular expression?)

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

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

  1. www.website.nl/contact/#wpcf7-f302-o1
  2. www.website.nl/offerte-aanvragen/#wpcf7-f323-o1
  3. www.website.nl/diensten/buitenreclame/gevelreclame/#wpcf7-f469-o1

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.

 

Genya

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.

Example:

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

or

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

 

I hope this helps to solve your problem.

Regards,

Güney