Block Referrals Spam from Google Analytics
To clean up your website statistics and provide the most accurate measurements of visits, country of origin and more, you'll need to tweak some filters within Google Analytics.
This is much easier than editing your .HTAccess file. But, may need to be done to tweak what was already in there.
You can also setup filters to remove data from specific countries. But, this may not be suitable if you do expect website traffic from certain countries that are known to kick out a lot of spam. The choice is yours.
Regardless,... let's dig into Google Analytics and discover how to setup filters for a website.
Here's how to begin.....
Login here:
Then, Click the Admin Link
Select All Filters
Then, click the Add Filter button:
Select Custom
Then, give this Filter a name so you'll understand what it's for.
I labeled mind Block Spam Referrals
Then, you can add filter patterns (sort of like keywords for Analytics to remove from your statistics). They can be domain names such as semalt.com -- more on this in a minute.
Under the Filter Type and within the Exclue, set the Filter Field to Referral
It's the Fourth option in the pull-down list:
Lastly, the bottom portion of the next image will show you how to select all the web traffic and add it to this filter.
Here's a close up of that bottom option:
Then, simply click Save
You should be left with something like this:
Cheers
Darwyn