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
-
ECommerce Tracking in Analytics - Should I use a plugin or do it manually?
Hi, I have a WordPress site (woocommerce integrated). I would like to know should I use a plugin to enable e-commerce tracking in Google Analytics or I should do it manually with GTM. Which is a better way? Will using a plugin to enable e-commerce tracking slow down my site? Any thoughts? Thanks in advance.
Reporting & Analytics | | Mr.Suren0 -
What is Local SEO in Google Analytics (Organic Source)
Recently, I saw "Local SEO" is mentioned as the organic source. Can someone please tell what is this and from where Google is fetching data for this source?
Reporting & Analytics | | Kevin.Monks0 -
"index.htm" for all url's in google analytics
I don't have this issue with other wordpress websites, only this one website, and I don't know what's causing the issue: Google Analytics is adding an "index.htm" to every single page on the website. So it is tracking the pages, I see no errors - is it tracking the right page? When I click on the page link in a report, I naturally go to a "404 page not found" since the website address isn't "www.example.com/rewards/index.htm" - but instead the actual address would be:
Reporting & Analytics | | cceebar
"www.example.com/rewards/". I have navigated to View Settings in GA to insure "default page" is empty. Although adding anything else to this field does not effect the page url in analytics reports either. Could it be htaccess file - or a plugin effecting the htaccess file?_Cindy0 -
Why isn't my google analytics working on a subdomain?
I have a website with Google Analytics which works fine. I tried adding the code to a subdomain using http://www.verticalrail.com/kb/filter-in-google-analytics-to-track-subdomains/ as a guide. There is no data showing up though. Any ideas?
Reporting & Analytics | | EcommerceSite0 -
Using Filters On Google Analytics
Hi Guys, I am In need of some technical help with regards to Google analytics. One of my clients has a site providing HR Software on SaaS basis. The users login via the site for the various HR Tools. Obviously this is skewing the analytics data and showing 10,000+ extra visitors that actually don't exist. Now I understand i can add filters and exclude certain pages for instance the login page, however, some users will visit the home page then click login. How can I exclude them just to show new visitors to the site rather than users that are just trying to login. Hope this makes sense Neil
Reporting & Analytics | | nezona0 -
Google analytics for mobile apps - do we need different id's?
Dear all, if I want to implement Google Analytics for my mobile apps: Do I need different accounts or id's to ensure separate tracking of my website and mobile apps? How did you do it? Thanks!
Reporting & Analytics | | HMK-NL0 -
How can I verify if someone is Google Analytics certified?
I am looking to hire an IC to help with analytics. I need to know how I can verify if they are GA certified. They gave me a link to a http://www.starttest.com profile. Is that legit?
Reporting & Analytics | | inhouseseo0 -
Google is listing my site using IP also, is it normal?
https://www.google.com/search?sourceid=chrome&ie=UTF-8&q=site%3A50.97.XXX.XXX About 7,050 results (0.24 seconds) when we do list by domain we get : About 10,400,000 results (0.29 seconds) is it ok? would google smart enough to count IP address not as duplicate content?
Reporting & Analytics | | tpt.com0