Regex in Analytics for longtail content
-
I have spent quit some time now, trying to figure this out. I wannt to segment landingoage traffic to the longtail content. That's content in the 3rd or 4th subdirectorylevel. I would like to do that by saying google: "Just show me traffic that arrives on landingpages with 3 OR 4 slashes "/"
But I can't get a solution, can anybody help in the seoMOZ community?
-
A very handy guide here on regex specifically for this kind of thing, with a bit of tweaking you can also filter right down to number of words in the phrases too if you want to (handy if you are looking for more specific conversion phrases)
-
Ok, I have to admit, this answer is not my own. I "borrowed" ok, I stole the answer from Tom Critchlow. Your question was very intriguing so i took the time to research an answer for you.
Here is the regex string that will segment traffic according to the number of slashes in an url.
^/([^/]+/){3}[^/]*$
This specific regex segment will show urls with 5 slashes. You can play around with adding and subtracting slashes untill you find the perfect string for yourself. Here is a link to the article where Tom talks about this topic.
- Bryant Jaquez
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
-
Unsolved Google Analytics (GA4) recommendations for SEO analysis?
Guides on Moz and elsewhere mostly refer to Google Analytics' Universal Analytics (UA). However, UA is being replaced with GA4, and the interface, options, and reporting are very different. Can you recommend a clear, thorough, and effective walkthrough of how to set up useful SEO reports in GA4? Is there a simple tool you recommend that will help connect historical data from UA to GA4 when GA4 is the only option available? If there's no simple tool, what values do you recommend retaining from UA for effective historical reporting? How would you use them? At minimum for reporting, I'd want to show month-to-month changes and year-to-year changes (in percentages and in real numbers) for the following: all site visits all organic visits organic visits as a percentage of all site visits organic visits that led to a specific goal completion organic visits that led to any goal completion Thanks in advance for your help!
Reporting & Analytics | | Kevin_P1 -
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 -
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 -
How can you tell if your new content has been indexed?
Other than simply doing a search in each case, is there any way I can tell (in Webmaster Tools, for example) if the 500-1000 new pages of content I have added have been indexed and are now appearing in search results? My traffic hasn't risen much, but I know at least a few of them are in there... How can I tell when they're all in?
Reporting & Analytics | | corp08030 -
Multipul Analytics codes usage
I need to launch 13 local websites and need to have two analytics codes on each site, one is unique for each site and the other is the same across all sites. any advice on how this is best done?
Reporting & Analytics | | imsmlouis0 -
Do Google Analytics filters affect link building?
We recently made a few link wheels for specific product pages. We've been having great results with all of the wheels except for one. The one we are having issues with is the only link that we were using a Google Analytics filter on; it looks like this http://domain.com/page.htm?zSource=Specific Keyword%tracking My question is does Google ignore links that are obviously utilizing their analyitcs custom filters? We're doing some more testing to try to find out if it truly is the link or if the wheel is a bad one. There are so many things that could go wrong but with so many of our link wheels working well, I wonder if the filters are what is causing such results.
Reporting & Analytics | | MichealGooden0 -
Campaign tracking and duplicate content
Hi all, When you set up campaign tracking in Google Analytics you get something like this "?variable=value parameters" in the URL. If you place such a link on your site as an internal link, will it be considered as a different URL and will have its own link value? The question I have is, since Google knows it's a Google link and knows the original URL (by stripping the tags), does it pass link value to the original URL? If not, what can be done to pass link value? Thanks in advance. Henry
Reporting & Analytics | | hnydnn0 -
Analytics giving crazy impossible data?
When I look at my Analytics using any of my segments, they don't work. It shows zero visits for the segment until April 30th, then the visitors for the segment shoots up to above the number for all visits! Anyone else experiencing this bizarre data?
Reporting & Analytics | | mascotmike0