Here's how to block spam traffic.
-Open the browser and go to Tools (alt+x) > Internet Options. Now click the security tab and then click the red Restricted sites icon. Click the Sites button below the icon.
-Now in the pop-up, manually type the websites you want to block one-by-one. Click Add after typing the name of each site.
1. Filter your Analytics traffic
Filtering your Analytics traffic is a good idea because it helps you understand what’s being removed from your data set.
2. Block the known bots and spiders
Scarily, you could end up with a LOT of bots in your SEO traffic. The good news is that you don’t have to remove all the bots manually because Google Analytics has a handy button that will block the known bots.
3. Add your own spam referrers
Google Analytics is pretty good at blocking known bots from your data, and you should definitely implement the above step. However, there will still be some referrers that slip through the net.
4. Setup a bad referrer filter
Go back to your new view and create a “Bad referrers” filter. Don’t do this at the account level but at the view screen
5. Block traffic from specific countries
This technique is only recommended if you know for sure you’re getting a lot of spam traffic from specific countries and very little legitimate traffic.
6. Ban bad bots
This is a difficult one and – without wanting to terrify you – if you use the wrong character, you can ruin your whole site.