In order o stop all Ghost Spam, instead of excluding each of them in an "Exclude Filter" it is best to INCLUDE all of the valid domain/hostnames that you WILL accept in an "Include Filter" and this way anything other than will not get through or attack your website.

This "Include Filter" works for all of the different traffic channels/categories, not just for the Referrals category because ghost spam attacks all categories.

Create An "Include" Filter in GA To Stop Ghost Spam

Step 1. If not signed-in to GA, go ahead and do so.

Step 2. At the top menu click on the “Admin” tab and select “View”.

Step 3. Select “Filters” and choose “Create New Filter”.

Step 4. For Filter Name enter “Include Valid Hostnames”.

Step 5. Then for Filter Type select “Custom”.

Step 6. Then choose “Include” and for the Filter Field choose “Hostname” from the dropdown menu.

Step 7. In Filter Pattern, paste the REGEX pattern that you created.

Step 8. Verify if the filter works. In Filter Verification click on “Verify this filter”. You should then see 2 columns, a before and after. The "after column" should be empty.

Note that if the "after column" is not empty then there is an error or problem with the REGEX pattern and you will see an error message at the top. It must be fixed and corrected before you save the filter or it will not work.

Step 9. If the "after column" is empty, click “Save” and your done!

Keep in mind that if you’re going to be including your Tracking-ID for a service, that you will need to include that hostname in this "Include Filter" so that GA counts it as valid incoming traffic. Other than that, you don’t need to keep any maintenance on it.




Join the Discussion
Write something…
Recent messages
JKAshipala Premium
Very helpful article indeed.
Reply
NRosales Premium
I found you and though I am not applying the training on my GA, I know for sure that it will help me, my site is almost saturated with spam. I am almost a year old in Wa, is this incident normal.
I would like to thank you for this training as I know it will help.
Reply
Aliee Premium
Hi, yes my site had lots of "referral spam" on it so I wanted to find a way to get rid of it. The website I found seemed to be the best and easiest one to help me do this.

If you've never applied any filters for the spam then yes, I think that's normal. I'm glad I could help! :)
Reply
GolfSpecialt Premium
Thanks Aliee, this was very helpful as a newbie here. One quick question? My tracking numbers look like this UA-#########-# do I just enter this exactly as it appears in the REGEX string separated by a |?
Reply
Aliee Premium
Hi, sorry to get back to you so late. I've taken another hiatus and hope to be back to work here soon! The tracking number that you're talking about with the UA at the front doesn't seem to be a spam name to enter into a REGEX string. This tracking number is something else and is not what is supposed to be entered so I suggest that you don't enter that tracking number. Feel free to send me a private message if you need more info. on this.
Reply
electrobot Premium
I stopped using GA. I found GA to have zero value to me.
Reply
Aliee Premium
Really?? What are you using now to track your incoming traffic?
Reply
electrobot Premium
I just roughly guage my traffic based on comments, site feedback, and email I receive. Also, I do a google search regularly to see how my posts and pages appear. I've just had way to many problems with GA. Also, studying the stats has never helped me to increase my site traffic or produce more quality content. Just my thoughts and opinions on the matter. Thanks for your informative and instructive training. :)
Reply
Aliee Premium
Ok, makes sense. I mainly wanted to do this for my website because I didn't want it to interfere with getting a good ranking in google. I didn't want to have mostly spam as traffic to my site and then google think that my site was spam too, especially when you're a new site and want to make a good impression. It just makes me feel better to know that I can control it to a certain extent. Take care :)
Reply
Top