I took the advice from this article to eliminate referral spam from my Google Analytics report by filtering out all hits that didn't use my hostname. There is only one other filter on that view, one that filters hits from my IP. It is a straightforward predefined filter: Include only > Traffic to the hostname > that are equal to > (my hostname).

But when i check my unfiltered view, there are Twitter hits. There are no Twitter hits in the filtered view. This is the only valid traffic being excluded, and i am a little surprised - Twitter isn't using my hostname?

Is there a way i can get Twitter into the view?

Edit: as suggested i checked what hostname Twitter is using with a secondary dimension (in Acquisition > Channels> Social, 2nd dim. Hostname, found under Behaviour). That shows they are using the usual hostname, www.briligg.com. In the unfiltered view, there are 21 such hits since i set up the Twitter page. In the filtered view, there are now 4 Twitter hits, all from yesterday (which is after i asked about this). My AddThis report shows 7 hits from their share buttons over the same period. I'll discount generously for hits that could have been me checking links and share buttons and thus came from my IP and were filtered. There are still at least 7 hits that were filtered for some other reason. Small numbers, but big percentages.

Did some sort of updating in Google's system have to happen for this to register? The Twitter link is only a week or so old (the account is much older but i never configured it - i was just reserving the name). The share buttons are similarly recent.

  • Remove the filter. Okay, that sounds simplistic, but filtering, as you say, by filtering out all hits that didn't use my hostname (and I am assuming referral traffic here since you were not specific) filters out all other valid referral traffic. You really want to filter out only the referral traffic that is specifically undesirable. Do your surgery with a scalpel and not a sword. I am leaving room for an answer that details how to set-up a better filter.
    – closetnoc
    Mar 22, 2015 at 23:45
  • @closetnoc The only valid referral traffic not showing up is Twitter. I had wanted to avoid having to make a filter for each spammer, which would take time and need constant maintenance - there is a new spammer just today, and i have a feeling many more are on the way. In fact, i would still prefer to not do that and just check Twitter hits in my unfiltered view, just to save time and effort. I do everything on my site myself and need to try to be efficient.
    – kim holder
    Mar 22, 2015 at 23:52
  • Okay. I will let someone who knows GA filtering answer. I tend to stay out of GA. I am glad for the clarification! It will help you get a better answer.
    – closetnoc
    Mar 23, 2015 at 0:05
  • @closetnoc - i made an edit in consideration of that point.
    – kim holder
    Mar 23, 2015 at 0:11
  • Since you have an unfiltered view, you should be able to determine the hostname that was actually used in the referrals from Twitter. Can you check that? Mar 24, 2015 at 7:30

2 Answers 2


I guess that the answer is that you should correct your filter so that it accepts pageviews for www.briligg.com and briligg.com.

It is also important to note that for a given pageview, the referrer reported in GA isn't (necessary) the value of Referer header of the corresponding request, but the referrer of the request that brought the visitor to your site. This means that when the visitor follows internal links on your site, the referrer reported for these pageviews doesn't change.

The problem is that your site has absolute links that bring visitors from briligg.com to www.briligg.com. With the wrong filter, the initial pageview(s) will be discarded and the original referrer is lost. When the user then transitions from briligg.com to www.briligg.com, the referrer will either be reported as briligg.com or the pageview will be considered as direct.

  • So am i right in thinking that if i just discard the www. from the filter, it will accept both versions of the hostname? Yeah, i tried it, and it worked, as long as it was done in the 'custom' filter section. The verifying tool showed up i think it was 9 more sessions.
    – kim holder
    Mar 24, 2015 at 21:58
  • I never did that, so I'm not 100% sure, but I think you should use a custom filter on the hostname, so that you can use regular expressions: customreportsharing.com/topic/…. Since the goal is to eliminate referrer spam, you may also consider alternative methods that have less pitfalls: veithen.github.io/2015/01/21/referrer-spam.html. Mar 24, 2015 at 22:04
  • Yes, it had to be done through the custom filter, but because the Filter Pattern field is set up for regular expressions, all i had to do is enter 'briligg.com' and it interpreted that as 'any string containing briligg.com' automatically. The 'Filter help > Learn more about Regular Expressions' info was all i needed.
    – kim holder
    Mar 24, 2015 at 22:40

First, you need to configure a filter that only excludes referral spammers from your view. Go to your view and set up the Filter as follow:

  • Filter type: Custom
  • Exclude
  • Filter Field: Referral
  • Filter patter use the following regex:


Check the tld (com, net, co, etc) of the spammer* and change it accordantly inside the regex. *Find the list of spammers in Google Analytics in the Acquisition>All Traffic>Referrals report (You will need to monitor this section just in case new spammers arrive). There are other methods though, be aware that this method requires you to maintain the regex on a regular basis.

  • With that approach you will have to update your filters every week, which is why the OP is using the hostname based approach. A real answer to the OP's question should provide an explanation why this doesn't work. Mar 24, 2015 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.