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.
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
-
If website users don't accept GDPR cookie consent, does that prevent GA-GTM from tracking pageviews and any traffic from that user that would cause significant traffic decreases?
I've been doing a lot research on GDPR impact and implementation with GTM-GA for clients, but it's been 12 months since GDPR has gone live I haven't found anything on how GA traffic has been impacted if users don't accept cookie consent. However, I'm personally seeing GA accounts taking huge losses in traffic since implementing GDPR cookie solutions (because GTM/GA tags aren't firing until cookies are accepted). Is it common for websites to see significant decreases in traffic due to too many users not accepting cookie consent? Are there alternative solutions to avoid traffic loss like that and still maintain GDPR compliance? It seems to me that the industry underestimated how many people won't accept cookie consent. Most of the documentation and articles around GDPR's start (May 2018) didn't foresee or cover that aspect properly, everything seems to be technically focused with the assumption that if implemented properly most people would accept cookie consent, but I'm personally not seeing that trend and it's destroying GA data (lost traffic, minimal source attribution, inaccurate behavior data, etc). Thanks.
Reporting & Analytics | | Kickboard2 -
What does 'Safari (in-app)' mean in Google Analytics browser traffic?
Hi, can anyone explain what 'Safari (in-app)' refers to in my browser sources? Also, it has a very high bounce rate - any ideas why?
Reporting & Analytics | | b4cab1 -
High Bounce Rate on traffic generating area of our site
Hi, Our eCommerce site currently includes a blog section known as Igloo which we have filled with unique and helpful content that is useful to a fair few people, not just customers of ours. It currently attracts a large number of visitors (more than the actual eCommerce side of the site in actual fact) organically who aren't currently customers of ours. Very few of these turn in to paying clients so it's not really a money spinner but it has worked quite well from a linkbait perspective / traffic generation perspective and undoubtedly a few of these people do end up making a purchase on the actual shopping end of our site. We're look at ways to encourage these people finding help on this free resource to take a look at our homepage and hopefully make an order but in the meantime I am worried that there may be a few downsides to us creating this content: Google may see us more as a help site than a shopping site. Since selling products is where we make our money this could ultimately be a bad thing. Our bounce rate is REALLY high (I'm talking around 94%) on the help site versus around 20% on the eCommerce site. I guess people land on the article they want, read it and then disappear. Would this bounce rate skew our entire site stats and ultimately result in decreased performance in the SERPS. I would appreciate your opinions and, in the event you do feel it may be hurting us overall perhaps some suggestions on how to mitigate the effects? Many thanks!
Reporting & Analytics | | ChrisHolgate0 -
Huge Traffic Drop after 301, Keyword and Schema.org Fixes
Hello there, I'm first gonna explain what I did to my website: I was using a 302 redirect to send from http to https, fixed it to a 301. My url has a keyword and I was using many pages with keywords as well. ex) www.keywordhaha.com/keyword-the-best , www.keywordhaha.com/keyword-easiest-on-keyword-market Changed it to : www.keywordhaha.com/app , www.keywordhaha.com/games, etc... I was not using any crawler tools, so I added Schema.org, Json-LD and rdfa-node, which are all working properly. Synced my page with our Google+ page, which was recognised by Google Added a proper logo and fb:admins, and was recognised by facebook. After I did all this optimisations, I experienced an immediate traffic drop (10%) and my impressions/clicks according to the webmaster tools dropped 75%, in a 2 day period. Any ideas where there could have been a mistake? mPdhFdG.png
Reporting & Analytics | | jancpc0 -
Analytics not tracking traffic from Old Domain Redirect
We've recently 301 redirected one of our client's domains to their new website and the strange thing is, we aren't seeing an increase in traffic in analytics. You would expect the traffic to increase roughly by the traffic volume from the old domain. There were a few hundred redirects and we tested a large sample and the redirects have been implemented properly. Is there something that we did incorrectly in our implementation of the domain redirect? Or is there something else that we need to do in Analytics to properly track those redirects?
Reporting & Analytics | | ATMOSMarketing560 -
Testing IP Exclusion Filters in Google Analytics
(I hope I haven't missed something simple 😉 I have add IP exclusion filters in Google Analytics. What I haven't been able to determine is how to test to see if it is working. I'd imagine there would be a dip in traffic but if a site is low volume it might not even register. Thanks!
Reporting & Analytics | | AUDigitalMarketing0 -
Strange traffic - panda, penguin? Screenshots attached.
Hi, I'm unsure if I've been hit by penguin/panda. I've attached screenshots below. The first one is April 1st to today. The second is all of April and the 3rd is 1st June to today. The site was offline at the beginning of July which explains no traffic. My traffic took a dip though on April 6th which as I understand it wasn't a panda/penguin roll out? I then got hardly any traffic for May to mid June. Then the site was offline due to a server problem but when it came back on traffic was the highest it has ever been. Today however I am getting zero search engine traffic? I can't figure out what's going on. Can anyone shed any light on the issue? DTJXE DTJXE Dpj21 qHTpj
Reporting & Analytics | | SamCUK0 -
Why do I get lots of traffic from a bizarre keyword?
Bit of an odd one but I've been getting a large and steady stream of traffic over the last few months from a very random keyword that according to addwords figures shows "on data". Its our second biggest referring term only beaten by our brand name. We get more traffic from this term than keywords we have invested a lot of time in that show thousands of traffic volume in addwords. When looking at behavioral data its gets odder, a bounce rate of 98.11% time on site 2 seconds and page visits 1.02. So this traffic isn't real traffic and it's not real people. So my questions are, what is it? why do we get this random traffic, has anyone els noticed things like this and is it a problem? I presume it must be something to do with some sort of spam but apart from that i'm stumped. It's just one of those things that has been bugging me so I would appreciate any help. Kind Regards Paul
Reporting & Analytics | | pauldoffman0