Regular Expressions in Google Analytics
-
I want to use the Google Analytics landing page reports to look at the bounce rate of top level pages excluding the homepage. So pages with urls:
Does anyone know a regular expression that will allow me to do this?
Just to clarify I do not want to look at the bounce rate of the homepage or any pages deeper than www.example.com/example e.g:
Thanks in advance
-
This works a treat.
Thanks for your help!
-
Hi,
Wow, this was a really hard question. Finding all your top landing pages was the easy part, but excluding the homepage is a bit more difficult because its hard to exclude within Regex. But a I got a "stable" solution which hopefully works for you.
^/([^/])[^/]*$
It looks for urls which start with "/" and are followed by text where not a slash is found in. Because all your deeper pages contain at least one "/" more this is the way to exclude them. Hopefully this is what you ment.
With this solution you have to be sure that the default page in your Google Analytics is empty, like here. This will take care that your homepage is served within content reports as: "/" so it will be excluded with the regular expression seen above.
-
May be a bit OT, but have you tried playing with something like http://gskinner.com/RegExr/ to try out regex combinations for what you need? Regxr's got a stack of 'template' regular expressions available in the menu on the right.
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
-
Is there a way to filter all computers on a specific IPv6 network in Google Analytics?
Is there a quick way of filtering the IP addresses for all the computers on a network that's using IPv6? I want to filter out visits to our websites from the devices on our office network, but each computer (and phone and tablet) seems to have a different address. It _looks _like they all start the same way, though. One computer is xxxx:xxxx:xxxx:xxxx:aaaa:aaaa:aaaa:aaaa, another is xxxx:xxxx:xxxx:xxxx:bbbb:bbbb:bbbb:bbbb, my phone is xxxx:xxxx:xxxx:xxxx:cccc:cccc:cccc:cccc, etc. Does this mean that xxxx:xxxx:xxxx:xxxx is the address for our network as a whole, and I can just set up a Google Analytics filter for "IP addresses starting with..."? Or would doing that also filter out hits from, like, every visitor within a 20 mile radius of our office? If I need to simply put in the individual addresses for each and every device, I will. I'm just hoping it doesn't come to that. Thanks!
Reporting & Analytics | | BrianAlpert780 -
Google Analytics - Tracking multiple thankyou pages?
Hi Guys, I want to track email opt-ins for multiple thank you pages. The setup is as follows: http://image.prntscr.com/image/57632e05a15f42fda0b8ffec2d176460.png I have not yet built the thank you pages, so i was wondering what the URL should be to make it easy to track them in GA? I'm thinking: domain.com/thankyou-page/page1 Then using regular expression in GA to track /thankyou-page/ Would this be a good way to go about it? Cheers. f6c7r0
Reporting & Analytics | | spyaccounts110 -
Google Analytics Page Metrics and Redirects
Hi All- Context: A site has been redesigned. Pages were renamed in the process. Problem: It's very hard to compare before and after metrics because the page URLs are not the same. Question: Anyone know how to do this in Google Analytics? I'm hoping there's some simple trick I just don't know about. D
Reporting & Analytics | | DonnaDuncan0 -
Google Analytics - Keywords (not set) or ( not provided) WHY???
In Analytics, most of my visitors are landing on my home page, but when trying to see wich keywords they use, most of them are: (not set) or ( not provided) See screencast: http://screencast.com/t/AKwPW76qLVsN Can you tell why? What is going on? Is there a way to solve this? Thank you, BigBlaze
Reporting & Analytics | | BigBlaze2050 -
How do I manually add transactions to Google Analytics
We are seeing Google Analytic's drop transaction on our site so therefore all the figures are skewed. Is there a way I can manually add transactions to GA to cover the missing one?
Reporting & Analytics | | Towelsrus0 -
Google Analytics Site Search to new sub-domain
Hi Mozzers, I'm setting up Google's Site Search on a website. However this isn't for search terms, this will be for people filling in a form and using the POST action to land on a results page. This is similar to what is outlined at http://support.google.com/analytics/bin/answer.py?hl=en&answer=1012264 ('<a class="zippy zippy-collapse">Setting Up Site Search for POST-Based Search Engines').</a> However my approach is different as my results appear on a sub-domain of the top level domain. Eg.. user is on www.domain.com/page.php user fills in form submits user gets taken to results.domain.com/results.php The issue is with the suggested code provided by Google as copied below.. Firstly, I don't use query strings on my results page so I would have to create an artificial page which shouldn't be a problem. But what I don't know is how the tracking will work across a sub-domain without the _gaq.push(['_setDomainName', '.domain.com']); code. Can this be added in? Can I also add Custom Variables? Does anyone have experience of using Site Search across a sub-domain perhaps to track quote form values? Many thanks!
Reporting & Analytics | | panini0 -
Google Analytics for multiple languages on multiple domains
Hi folks A quick question in regards to setting up Google Analytics for a website with multiple languages on multiple domains. The domains that needs to be tracked are: www.example.com -> English www.example.se -> Swedish www.example.dk -> Danish To my best knowledge this can be acheived in Google Analytids using 3 different setups: Different accounts Different properties Profiles What would you guys consider the best approach?
Reporting & Analytics | | Resultify
Pros and cons? Have a great day Fredrik0 -
New Google Analytics Site Speed tool and excel
Hello, I was wondering if there is a good tool or method to pull the new Google Analytics Site Speed data into excel and use this document to track site speeds on a weekly basis for multiple clients? Any good articles or how-to's would be awesome!
Reporting & Analytics | | Hakkasan0