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
-
Goal Tracking In Analytics On Separate Ordering Website
I have a question for any Google Analytics wizards out there. We have two clients that have a similar complication when it comes to tracking goal conversions in Analytics. Basically, all the conversion actions we want to track occur on a separate website; either an iframe embedded on the page or through an entirely different ordering website. Trick is, Analytics sees the source for all these conversions as referrals from the main site. We'd like to get visibility back to the original source/medium that brought visitors to the site before they converted. Anyone have a suggestion for making that happen?
Reporting & Analytics | | fivefifty0 -
Google Analytics Tracking Code Problems
I am having a problem with my Google Analytics tracking codes. The relevant GA tracking codes have been entered into the source code of certain sites I'm running campaigns on, but Google Analytics is still telling me that the tracking code hasn't been installed - yet it has. What could possibly be the problem here? I have checked that these sites don't run off multiple domains, and that the tracking code has been entered in the correct place within the source code - and yet I am still having problems with GA. Any suggestions?
Reporting & Analytics | | WebhouseISP0 -
Referral Traffic vs. Campaign Traffic in Google Analytics
I have two sites: a blog and an ecommerce site. The blog funnels people to the ecommerce site. In Analytics I'm seeing declines in referral traffic from the blog to the ecommerce site. During the same time I'm seeing an increase in campaign traffic to the ecommerce site, with most campaign traffic coming from the blog. I believe the increase in campaign traffic is largely a result of simply having installed more tracking links. This leads me to believe that the declines I'm seeing in referral traffic is simply a result of the increase in campaign traffic. In other words, what was once counted and reported as being referral traffic is now being counted and reported as campaign traffic. So my question is this: In Google Analytics is campaign traffic ALSO reported as referral traffic, or is campaign traffic reported separately and not duplicated in referral traffic reports? I'll provide a concrete example to make this more clear in case it isn't: Say site X sends 1000 visits each month to site Y. Say 50 of those visits come from a single link on X. If that link is changed so that campaign Z data info added (via the Google URL Builder), would you expect to then see 950 referral visits each month from site X to site Y plus 50 campaign visits to site Y via new campaign Z, or would you continue to see 1000 referral visits plus the new 50 campaign visits? Many thanks in advance to anyone that can shed some light on this.
Reporting & Analytics | | aaronprimal0 -
Goals in analytics
How do you establish which keywords generated traffic that resulted in goal completions (in GA) ? I thought this would be Reverse Goal Paths but this only goes back as far as the original page. Goal Flow shows the traffic source which is better but not the kw used ? Cheers Dan
Reporting & Analytics | | Dan-Lawrence0 -
SEOMoz crawls skewing Avg Visit Duration in Google Analytics
Hello, We are a UK based company. Our Google Analytics account is showing a rise in Avg Visit Duration for 'Direct traffic' since we started using SEOMoz. Are any other users experiencing this issue? We tracked it down to City Seattle, and when doing an Advanced filter by removing Seattle, the results are normal again. What does SEOMoz or other users recommend we do besides continuously using advanced filters? We have enquired about excluding Roger's IP address, but have been told that Roger uses the Amazon cloud, so the IP is not static. See attachment for screenshot of our Google Analytics account of Avg Visit Duration since we began with SEOMoz. Rich Talbot 718g3.gif
Reporting & Analytics | | STL1 -
Setting up Google Analytics default URL
If someone has set: the default url in Google Analytics to a non-www address (http://mysite.com) then placed the UA tracking script from that GA account within the CMS framework of the website... ... and then set the permanent 301 redirect in the htaccess file to redirect to the www address (http://www.mysite.com). How less accurrate will my GA analytics measurements be considering the default url within GA is non-www and the permanent 301 redirect in htacess is to the www-address? Anyone know how reliable GA reports are until the default url in GA analytics is changed to match what is the redirected url in htaccess file? _Cindy
Reporting & Analytics | | CeCeBar0 -
Transferring Google analytics accounts
Hi, Does anyone know if you can transfer an Google Analytics account. We are looking to take over a new clients existing website and the analytics account is registered to their current web designers. Is it possible to transfer it to the client so that their existing web company no longer has access and they keep all their historical data, or do we have to start from scratch. Thanks Fraser
Reporting & Analytics | | fraserhannah0 -
Strange increase in Direct traffic in Google analytics
For past 2 weeks, several of our sites have strange increase in direct traffic in Google Analytics. we also have another tracking code, and in this account we don't have any big changes, so this is very strange what is happening. We didn't changed any codes, and none of the changes were done to application. Any ideas why this is happening? z7ME9.jpg
Reporting & Analytics | | InformMedia0