How to filter out traffic from subdomain using regex?
-
Hi There,
We have a test server that lives on a subdomain which we'd like to filter out in Google Analytics.
We're using the hostname filter but are having trouble understanding the regex needed, we're using this as the filter pattern:
Will that work? The profile is new so we can't test the pattern. Any pointers in the right direction would be much appreciated.
Cheers
Ben
-
Actually, I this we just put the hostname in there right?
A previous consultant had put a regular expression in there (the one from the question) but I suspect we just add the hostname.
-
Or do we just put this into the field?
domain
Will simply find 'domain' anywhere?
Cheers
Ben
-
Thanks Martijn, much appreciated.
It now looks like we're escaping the . (dot) - is that right? We're actually trying to match anything before and after 'domain' - to match any site on our test server.
Do we need something like this instead?
^domain.
Sorry I'm not understanding how this works - have read so many tutorials but can't figure out what the 'anything' character is?
Cheers
Ben
-
Hi Ben,
This won't completely work as the . (dot) also has a function in Regular Expression which means it can be any single character. So what you need to do is escape that one. Then it will eventually become something like:
.*domain.com.
Martijn.
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
-
Increase in Direct Traffic plus Bounce Rate rise for all traffic sources
Hello, I work for an agency and we have seen a big rise in bounce rate for 4 of our clients which happened on the exact same day. This rise on bounce rate is across all traffic sources. We are also seeing a big increase in direct traffic, starting on the same day. Is it possible for bot traffic to affect the bounce rate of all other traffic sources? We have ruled out double reporting in GA but can explain how the bounce rate has increased for all traffic sources. How is this linked to the rise in direct traffic (in some cases as high as 500%)? Thanks
Reporting & Analytics | | jenallen0 -
Over the last few months i have seen a huge spike in traffic from foreign countries
In GA i have seen a huge spike in traffic from foreign countries like japan, china, brazil, germany. the bounce rates are almost all 100%. any ideas why this is occurring?
Reporting & Analytics | | dhanson240 -
Separating branded from non branded org. traffic volume
What is the easiest way of separating branded from non branded org. traffic volume? I've created great rankings for a client, and at the same time their brand searches seem to have dropped a lot. How do I present this in the best way since GA only shows little org. keyword info. Thanks!
Reporting & Analytics | | Majsan0 -
Strange Traffic / Viewed content in Analytics
Hi Im looking at the content viewed in December for a clients site and there's a high number of page views for some non-existent pages which received multiple hits eg. domain.com/dr-capability/ with 241 page views (54 unique page views) How can you have multiple page views (and many unique page views) for pages that don't exist ? Is it possible page is being generated automatically or something ? if so how come ? Any ideas as to whats causing this much appreciated ? All Best Dan ps - also many above average home page views
Reporting & Analytics | | Dan-Lawrence0 -
See which Google TLD organic traffic is coming from in GA
Hi all, I'm working with a client that is marketing to English speaking ex-pats in Thailand. I have a suspicion that many of these ex-pats are searching through google.com (or .co.uk) instead of google.co.th. In Google Analytics (or any other tracking tool), is there a way to see which country-specific Google domain organic searches are coming from? Thanks, Tim
Reporting & Analytics | | TimKelsey0 -
Direct Traffic Source?
Hi all, Having some trouble figuring out a metric I'm dissecting. We have a large amount of traffic going to deep pages and I'm looking at the traffic source and an alarming amount are coming as Direct traffic. The thing is this can't type in or bookmarked traffic, so what else could it be? We have numbers like 80% and 60% for direct traffic, which judging by our previous efforts, that just can't right. Anyone can figure out what I may be missing out? Deeper pages should usually not get as much Direct traffic, so what can it be?
Reporting & Analytics | | William.Lau0 -
Ideas for a strange surge in direct traffic
Being the type of person that can't stop checking my Google Analytics, I noticed this morning that between the hours of 12 and 2 central time last night I recieved a strange surge of direct traffic. My site typically gets around 40 direct visits per day (most of them coming during peak hours around the time people are getting off of work). I received 150 direct visits during this random time in the middle of the night. My bounce rate soared as almost every visit was a bounce. The visitors locations are spread out as if it is natural human traffic. Every single one of the visitors is using a chrome browser. Has anyone else run into something like this? All I can think of is that someone might have an addon or toolbar for chrome that linked to my site for a while in a way that caused unsuspecting visitors to end up on my page. For now I'm keeping my fingers crossed and hoping the traffic doesn't return, as it could be bad news for my Adsense. *Edit: Also of particular interest, each direct visit went to an internal page on my site and no two of the 150 visits went to the same internal page. I also added an image showing a normal complete day's direct traffic and my direct traffic for today so far (The bulk of the surge came yesterday but the shot from today illustrates the surge better because it is missing my naturally daily direct traffic that comes in the afternoon) heXFb#LiiEr
Reporting & Analytics | | pattersonla0 -
Moved Up in SERPS & Traffic, Need Help Converting
Hello, After listening to the advice of many of you on this forum, I have managed to move my site up in the SERPS, close enough to where I want/need to be. My traffic has increased heavily, yet I am still not seeing a large increase in orders being placed. I am positive that I have the lowest prices on these items, and the most information available about them, yet I still can't seem to convert a lot of this traffic into sales. Can you guys please take a look at my site and provide some guidance on what I can/should do to help convert these visitors to customers? my site is : http://goo.gl/JgK1e Thanks
Reporting & Analytics | | Prime850