Question on regular expression for filters on GA
-
Hi guys, I am creating profiles on some of the countries sites in my network, and have managed to establish the filter for tracking certain url patterns, for example:
^/japan-english- is tracking all my urls in the Japan site that start by japan-english great! however, it is not tracking the japanese instance of the urls. The pattern for the latter is :
www.mysite.org/jp/japan-english
I could then modify the filter to track the jp subfolder like this:
^/jp/japan-english-
but it will then only track the urls on the /jp/ subfolder
does anyone know the regex command for tracking the two url patters as follows:
/jp/japan-english-
&
/japan-english-
thanks in advance
david
-
Hi John, thanks a lot for your reply... what I am actually after is two patterns rather than two url instances., eg:
/japan-english-* meaning all urls that follow that pattern
/en/japan-english-* meaning all urls (in English) that follow that pattern
so I have now got this on my filter pattern: /japan-english-
I hope it'll work both for the urls in English and in Japanese, I will post the results here,
cheers
david
-
The ^ character makes it so your expression only matches the beginning of the request URIs. If you remove it, all URLs with /japan-english will get picked up. That sounds like it should work for you.
If you really just want those two instances, you can include both and separate them with a | which acts as "or" in regular expressions.
There's a nice guide for using regular expressions in GA at http://www.ppchero.com/analytics-regular-expression-characters/ if you want to read more about them.
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
-
Organic reports showing a URL that isn't in Search Ask Question
In the image I've attached you can see that I have pulled a source/medium > google organic report. I've also made "landing page" my secondary dimension. The first landing page that is showing up is /v3/?slug=fnl, that is this page (https://orders.freshnlean.com/v3/?slug=fnl). You can see that the page has 230 sessions from Sep 3 - 9 and 17 transactions during that same time frame. The only thing is, that landing page is nowhere to be found in the SERPs. So how is it showing up in this report as having received google organic visitors that converted if it's not even in search? 05OclDp
Reporting & Analytics | | tdastru0 -
My domain as a sufix on GA reports
Hi, There's a friend of mine who asked me with some weird results on her sites' Google Analytics reports (http://esther-roche.es). I've searched the GA code and its GA account config and I've no clue about where this esther-roche.es is to remove it. Any idea? Thanks in advance, BzgPcAo.jpg
Reporting & Analytics | | Webicultors0 -
Free Media Site / High Traffic / Low Engagement / Strategies and Questions
Hi, Imagine a site "mediapalooza dot com" where the only thing you do there is view free media. Yet Google Analytics is showing the average view of a media page is about a minute; where the average length of media is 20 - 90 minutes. And imagine that most of this media is "classic" and that it is generally not available elsewhere. Note also that the site ranks terribly in Google, despite having decent Domain Authority (in the high 30's), Page Authority in the mid 40's and a great site and otherwise quite active international user base with page views in the tens of thousands per month. Is it possible that GA is not tracking engagement (time on site) correctly? Even accounting for the imperfect method of GA that measures "next key pressed" as a way to terminate the page as a way to measure time on page, our stats are truly abysmal, in the tenths of a percentage point of time measured when compared with actual time we think the pages are being used. If so, will getting engagement tracking to more accurately measure time on specif pages and site signal Google that this site is actually more important than current ranking indicates? There's lots of discussion about "dwell time" as this relates to ranking, and I'm postulating that if we can show Google that we have extremely good engagement instead of the super low stats that we are reporting now, then we might get a boost in ranking. Am I crazy? Has anyone got any data that proves or disproves this theory? as I write this out, I detect many issues - let's have a discussion on what else might be happening here. We already know that low engagement = low ranking. Will fixing GA to show true engagement have any noticeable impact on ranking? Can't wait to see what the MOZZERS think of this!
Reporting & Analytics | | seo_plus0 -
How is this site being tracked in GA?
Hi, Bit of an unusual one this, so please bear with me. This site http://www.hayesandhurst.com/ is being tracked in Google Analytics but we're unsure as to how. To the best of our knowledge we haven't inserted the tracking ID into the theme options or the tracking code into the source - and yet it appears to be tracking successfully! I did send some instructions to the client to set up the Analytics account in their name - I fear they have added the code somewhere to the site, but we cannot see where! Perhaps via Google tag Manager?? As I say, an odd one this, but if anyone can shed any light on this mystery i'd be hugely grateful. The tracking ID is UA-64505394-1 for the record. Regards,
Reporting & Analytics | | nathangdavidson
Nathan0 -
Filters for referral bots ineffective
I'm not sure what I'm doing wrong here. I've been trying to block spam from my client's analytics for over a month and I just can't seem to get it right. I am beyond frustrated. Here is a list of the filters I have: http://imgur.com/a/SVvEA#0 And here is referral traffic from them regardless: http://imgur.com/a/SVvEA#1 Specifically this is what the filter looks like. Am I doing something wrong here? http://imgur.com/a/SVvEA#2 I have also put a filter in place to block traffic from Russia, and it doesn't seem to be working 100% either. http://imgur.com/a/SVvEA#3 On top of that, it seems anytime I do manage to block something, another site just pops up in its place. Is it endless? My clients are very small local business and this is absolutely ruining their analytics. I can't even show them their traffic reports since it's absolutely meaningless with all this spam. Any help would be greatly appreciated.
Reporting & Analytics | | everestagency0 -
What is this GA URL I keep seeing?
According to google analytics, most of my traffic goes to two URLs: "/site/kempruge" and "/" now, I'm pretty sure both of these are taking people to my homepage, but I do not understand the "/site/kempruge' one at all. When I type www.kempruge.com/site/kemprure it 404's, so I'm not sure what URL it even is? Also, I'm wondering if this url is hurting my website in some way? I attached the screenshots, but they didn't load properly. I'll try to add another one in the replies. Thanks! Ruben [](<a href=)" target="_blank">a>
Reporting & Analytics | | KempRugeLawGroup0 -
How Do i filter my IP address from the results?
I want to block my IP address so that I get to know the traffic coming to my website
Reporting & Analytics | | pejman500 -
Segmenting traffic from referring sites in GA
Most of our traffic is from Referring sites, and in referring sites, job sites are sending most of the traffic. How can we segment traffic from job sites. There are about 40 such sites. We would like to receive a report which shows traffic excluding from these job sites.
Reporting & Analytics | | seoug_20050