Everyone is getting too much spam traffic from blackhatworth.com, darodar.com , economy.co , ilovevitaly.com , shoping.ilovevitaly.com , iedit.ilovevitaly.com etc…, Now the question is how to block them, so I have already figured a way to block them using javascript and PHP code but for some users it doesn’t seems to be working. The .htaccess method is not working at all. So now one more thing you can do is to filter them out from your analytics property. That’s not a solution but still you can stop this traffic from showing up and you can have a good look at your websites analytics how they are performing.
So after writing all the method of blocking with .htaccess , javascript and PHP now we will do it with google analytics filters.
Step 1 :
Login to your analytics account and click on admin on the top menu last option.
Step 2 :
Now click on property and select the property from which you want to filter out the spam traffic.
Then click on “Filters” on right side.
Step 3 :
Now click on +NEW FILTER
Step 4:
Now click on Custom as seen in the picture given below. Then write the name of the filter for darodar , for example darodar spam.
Now Click on “Select field” and select referral from drop down menu.
Next in “Filter Pattern” enter “darodar.com”
(adding darodar.com will block all the traffic containing darodar.com , adding ilovevitaly.com will block all traffic from ilovevitaly.com which is shoping.ilovevitaly.com and iedit.ilovevitaly.com)
Now click on save and you will see the finale screen which will look like this.
Follow steps 3 and 4 to add all the spam referral.
Please take note that this method only filters the referral traffic from showing up on your analytics which will improve your overall report.
It will stop analytics from creating new sessions and new users.
This will not completely block the traffic coming to your website.
Finally after adding some filter it will look like this
If you would like to block these spam traffic with javascript or PHP then see below article.
Block all the spams with single javascript and PHP code.
If you want to block all the referral traffic from bad websites then see this article.
Please share and comment for further help.
6 Comments
Adeel
Excellent and very easier to understand article. This is called a master piece. thanks God I am save from darodar, econom and vitaly.
Richard Mosqueda
thanks very much
Marg
THANKYOU so much- I have been inundated with these- now its blackhatworth.com too !!! So helpful and making it easy for us not so clever!!
Terry
Thank you. I’ve been looking for such a solution to get rid of hulfingtonpost spam.
Stacey
Hi there, could you explain what the difference is between filtering and referral exclusion list? Is one better to use than the other?
thanks
Ashish Prajapati
Both the methods does the same thing, you can use any one of these.
1. In referral exclusion when the referral hits you site it will not create a new session. Hence you will have more accurate analytics of your site.
2. The filters does many jobs like exclusion, include and also matches the pattern you enter and will not be shown in your analyrics.
Read here for more information.
https://support.google.com/analytics/answer/2795830?hl=en
https://support.google.com/analytics/answer/1033162?hl=en