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
-
Google Analytics Not Properly Attributing Goals
My GA has been working fine for years and is now suddenly attributing 100% of my goals/conversions to a "referral" source. In this case "crm.zoho.com". (see attached url) Our contact form is a zoho CRM form. When prospect fills it out online, it dumps them to a thank-you page and the conversion is counted. That all works just fine, but it is not attributing the conversion to Organic or PPC or Direct as it was a month or so ago. I'm not sure if this may be the cause, but I was cleaning up GA about a month ago, deleting some filters I didn't think I needed any more. Thank you for your help. 9CRUx
Reporting & Analytics | | sanctuary2420 -
Will changing the property from http to https in Google Analytics affect main unfiltered view?
I set my client up with an unfiltered view in Google Analytics. This is the one with historical data going back for years, so I don't want to do anything that will affect this view. Recently, the website moved from HTTP to HTTPS. There's a setting for the property that will allow me to change the property name to https://EXAMPLE.com and change the default URL to https://EXAMPLE.com. Questions: 1. If I change the property name and the default URL, will this somehow affect my unfiltered view in a way that I'll lose historical data or data moving forward? 2. I have heard that changing the default URL to HTTPS will help me avoid a common problem others have experienced (where they lose the referrer in Google Analytics and a bunch of their sessions go to direct / other). Is this true?
Reporting & Analytics | | Kevin_P3 -
How drop off works in google analytic for enhance ecommerce?
Hello Guys, I have implemented enhance ecommerce ( i.e. - https://developers.google.com/tag-manager/enhanced-ecommerce ) Now i have query how drops off actually works? Like i visited the my site, then product page then checkout step 1 page after that i close the checkout step 1 page that means checkout step 1 drop off will appear in google analytic? right? John
Reporting & Analytics | | varo0 -
When javascript is disabled, does a visit register goal completion in Google Analytics?
I'm looking for reasons why Google Analytics goal completions would appear to be fewer than the actual known number of online sales for a company, and I'm wondering if disabled javascript is likely to be the primary cause of a discrepancy. Thanks for any insight you have.
Reporting & Analytics | | williammarlow0 -
Expert Google Analytics: store with multiple languages and multiple sub-domians
I hope there's some hardcore Analytics shark out there, with a quick reply 🙂 I am setting up a store with multiple languages for a client and need to be able to track multiple sub-domains as a multiple languages in analytics. Example: dk.somedomain.com -> Danish language
Reporting & Analytics | | ReneReinholdt
www.somedomain.com -> English language
no.somedomain.com -> Norweigen language
.. and so on Now what the client would like is to have one single entity with multiple profiles in analytics, like this: somedomain.com
-> www.somedomain.com
-> dk.somedomain.com
-> no.somedomain.com
ex.. So if the client want's to see stats for the English language then he just vlivks the www profile and in case of danish he clicks the dk profile and so on.
problem here is I can't find an analytics help that addresses this specific issue. I have found this but that doesn't seem to cover it:. Any pointers would be greatly appreciated. 🙂0 -
Where are google analytics stats for iphone4
hi We were looking at the Google Analytics for one of our sites and noticed that there were NO pageviews from device=iphone and resolution=640x960 in the report. Given that iphone4 is supposed to be 640x960, and would be the most popular device (at least in our offices and everyone I know), it seems wierd. I sorted the Mobile Devices report by device and resolution to see what was available. The first 160 results were all device=not set. Finally got to device=iPhone and there were three entries: resolution 0x0 had 11 views resolution 320x396 had 45 views resolution 320x480 had 3,944 views. Hopefully all iphone4 users havent been classified as not set. Or is it possible that iphone4s claim to be 320x480 in browsers, as per http://www.alistapart.com/articles/a-pixel-identity-crisis/ Even worse, if I look at the Samsung Galaxy S II (myown phone), there are over 30 screen resolution combinations. Does anyone have anything to shed on this? I asked about it on the google analytics twitter account last week but havent had a response. Are there other analytics solutions that would distinguish between the iphones? Warning - this is a link to a large image, with the not set stats at the top. 6Sjji
Reporting & Analytics | | ozgeekmum0 -
Google API Tools - Next Analytics
Have you used any API tools like Next Analytics and/or can you recommend another tool that is particularly useful for a SEO?
Reporting & Analytics | | KnutDSvendsen0 -
Does Google Analytics use your data against you?
I couldn't find this question answered anywhere in Q&A, so I apologize if it's a duplicate of another post. I heard, about a year ago on either Web Pro World, or Warrior Forum that Google uses your visitor data in your Google Analytic account to rank your site. Someone said that when they took out the Google code, their site went from the third to the first page within 48 hours. That was then verified over the next couple of weeks by others. Their thought was that regardless of the optimized page and incoming link, if the site wasn't getting visitors, then it would be penalized. Since Google has the data, they would be able to use it. I then started using another, paid, solution - getclicky.com. While I like clicky, there is some info Google has that clicky doesn't, everyone integrates with Google analytics - like SEOmoz, and I'm paying a monthly fee. Now that I'm a part of a community of experts, what do you think? Have you noticed Google ranking you based on your analytics data? Has anyone experienced this, or heard about it before? Because I'd like to go back to using Google analytics. Thanks!
Reporting & Analytics | | DallasBonsai0