Using Regex for Goals in Google Analytics
-
I’ve got a website with 20 different forms; and I’d like to track all 20 form completions with one Goal in Google Analytics. The completion-page URLs follow the pattern below (the website uses Drupal CMS)
Form One: www.acme.com/node/2990/done?sid=651
Form Two: www.acme.com /node/2991/done?sid=785
Form Three: www.acme.com /node/2992/done?sid=1021
Form Four: www.acme.com /node/2993/done?sid=459
I believe that there is a way I can use regex so Google Analytics will track if any of these completion URLs appears. Looking for guidance how to format the regex statement.
-
Thank you Martijn. Regex is always tricky so it helps to have another set of eyes!!
-
Hi Eric,
Questions related to regex are always fun :-), so thanks for asking! I had a look and I think it could be working with this regular expression: "/node/[0-9]{1,}/done?sid=[0-9]{1,}". Don't use the quotes around the regular expression. You should be really cautious with this regex because I'm not able to test this on your data.
If you have any more questions please let me know!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Modify Google Analytics Script To Only Cookie U.S. Sessions
I know I can filter sessions from outside the US, but is there a way to modify the GA script so that it doesn't cookie visitors to a site if they are from outside the US? Note, this is separate from having a cookie consent opt-in. Thanks in advance,
Reporting & Analytics | | FitzSWC
Fitz0 -
Strange 404 Pages Appearing in Google Analytics
Hi, My client has some strange urls appearing in GA which lead to error pages. Please see the following image: https://imgur.com/a/6TPO8yL e.g URLs like /h/6445738.html I've used screaming frog to see if these pages exist on the website and I can't find them, anywhere. Therefore how are they coming up in GA? If anyone could please help I'd really appreciate it.
Reporting & Analytics | | SolveWebMedia0 -
Can you track two Google Analytics Accounts on one site?
If you have a site that had an old analytics account and then implemented a new one is it possible to run tracking code that records to both accounts without causing your site or data issues? We are doing this so we don't loose data at any point - ideally it wouldn't have been split between the two but making one redundant isn't an option. Ideally we would have merged the data from both accounts and had one - however the research we have done points to this not being a possibility - unless one of you guys knows different? It would be great if anyone has experience on any this.. Thanks
Reporting & Analytics | | ChrisAllbones0 -
Splitting Google analytics data
Hi Everyone I'm not sure if this can be done but thought i would ask anyway. One of our clients has a website which is a 3 tiered website, basically this means different access levels for different users depending on their ip address. The split is as follows (business 1, business 2 and the general public all see different things and areas within the website) Now what we are wanting to do is essentially split our analytics data for each of the 3 different users on the site, Can this be done through Google analytics? Thanks in advance. ps If im not clear enough let me know and ill try clear it up
Reporting & Analytics | | TheZenAgency0 -
Google Analytics: Different stats for date range vs single month?
I've been scratching my head, chin, and you name it over this one. I have an advanced segment to remove bot traffic from my data. When I look at the Audience Overview data for a single month (let's say Aug). I am shown a session count. No problems here, however If I set the date range to (January - August). The august monthly stats is incorrect, much lower. What this means is that, if I export a CSV report from Jan-Aug, the data is wrong compared to individually recording a month. Anyone faced this? I've asked the question over at the Google Analytics technical section as well, but no answer P.S I even used the 'control the number of sessions used to calculate this report' tool but no luck.
Reporting & Analytics | | Bio-RadAbs0 -
How many users completely block Google Analytics cookies ?
Hello everyone! In your experience, how many of your visitors' browsers completely block cookies including those of Google Analytics ?
Reporting & Analytics | | Masoko-T0 -
Google Analytics - Not provided info
Morning all, i am using Google analytics for some time now, One of the issues that i don't have a clear answer for is, when i am looking at Traffic Source --> overview In the Keyword column, that is a line (not provided) What we think here is that we cant see the keywords if someone arrived to our website but was logged-in to Google account Is this correct? is there a way to find the keywords behind this (not provided)? - i have many visits for this line (17.3% of all visits) and i don't know which keywords people used. Thank you SeoWise
Reporting & Analytics | | iivgi0 -
Google Analytics is not showing me eCommerce Section Details for My Online eCommerce Website!
From Last few days we are not able to find any details from eCommerce section at Good Analytics account for our eCommerce website i.e order detail, Price e.t.c. Please any one can suggest proper solution for this query?
Reporting & Analytics | | yuvastyle0