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
-
How to filter out traffic from subdomain using regex?
Hi There, We have a test server that lives on a subdomain which we'd like to filter out in Google Analytics. We're using the hostname filter but are having trouble understanding the regex needed, we're using this as the filter pattern: .domain.com. Will that work? The profile is new so we can't test the pattern. Any pointers in the right direction would be much appreciated. Cheers Ben
Reporting & Analytics | | cmscss0 -
Direct traffic spam on Google Analytics: how can you identify and filter it?
One of my smaller clients noticed a huge jump in direct traffic visits last month. The bounce rate was around 97% so I'm pretty certain that most of the traffic was illegitimate. I know how to filter out spam referrals and organic keywords in Google Analytics. However I'm not sure what to do about direct traffic spam. Are there recommendations for filtering this out? Can I identify spam IP addresses?
Reporting & Analytics | | RosemaryB0 -
How to trigger a pageview using Google Analytics API upon form submission
I need to set up a goal using the G A API to trigger a pageview when someone submits a lead on my site. There's no "thank you"page currently. How do I go about it? There's no "thank you"page currently. How do I go about it? I have never used the API but am very familiar with analytics. Thanks!
Reporting & Analytics | | Majsan0 -
Discrepancy between FB PPC and Google Analytics
This question was answered in 2011 here: http://moz.com/community/q/facebook-ppc-number-of-clicks-according-to-fb-different-than-visits-in-analytics. Wanted to post it to the community to see if anyone had any new thoughts in the last 3 years. I have been running campaigns on Facebook and seeing dramatic discrepancies between Facebook and GA's numbers. For example, I ran a Facebook ad campaign for a chiropractor where FB shows 35 clicks to the website, but GA only shows 2! An attorney ran a Facbook promotion, got 4 clients who actually filled out a questionnaire online, but GA only showed 2 visitors exiting off the form completion page. Is this because the users did not have JS/cookies enabled? Something else? What is the recommended work around? Tracking URL?
Reporting & Analytics | | aj6130 -
Google Analytics: Okay to change domain?
So, we are a long time user of GA and we're planning a domain change.
Reporting & Analytics | | jmueller0823
Does anyone know if I can 'change the domain' in GA so we don't lose our past data?
Thanks!0 -
Do target underscore blank links adversely effect Google analytics
Good morning from 17 degrees C about to rain again wetherby UK... On this page http://business.leedscityregion.gov.uk/invest/sectors/ there are a number of links that pop open new windows despite being internal links 😞 My question is please... "If an internal link to a site is set to _blank and pops open a new window are there any detrimental affects to google analytics tracking e.g. increased exits etc" Any insights welcome 🙂
Reporting & Analytics | | Nightwing0 -
Can you re sit the Google analytics IQ test?
Damn I just failed the Google analytics IQ test with a score of 65% 😞 You need 80% to pass... My natural instinct is to resit but after 30 mins of googling around Ive got no answer to the following question: "Can you resit the Google Analytics IQ test for free or do you have to pay again". Any insights welcome...
Reporting & Analytics | | Nightwing0 -
Omniture vs Google Analytics
What's your opinion on analytics tools? Specifically Omniture vs Google Analytics. Is Omniture really that much more powerful than GA? Have you used GA Premium, the enterprise package? My main question - Can GA (free or premium) do everything that Omniture can? If GA Premium and Omniture were the same price, which would you choose? Is one harder to implement, pull reports, tweak, ect? Thanks in advance.
Reporting & Analytics | | akim260