Step 1: Log in to Google Analytics. Select a website, navigate to Admin in the top-level navigation.

Step 2: Click on All Filters in the Account column.

Step 3: Click on New Filters. Name your filter, “Referral Spam.”

Step 4: Select the Custom filter type. Leave the Exclude option selected. Select Referral as your filter field. Paste this text into the Filter Pattern:

.*semalt.com|.*aliexpress.com|.*wellnessnvision.com|.*o-o-6-o-o.com|.*humanorightswatch.org|.*makemoneyonline.com|.*darodar.com|.*ilovevitaly.[co|com]|.*priceg.com|.*buttons-for-website.com|.*hulfingtonpost.com|.*bestwebsitesawards.com





Step 5: Scroll down to the bottom of the page. Click on all of your available views (unless you’re leaving one completely unfiltered for data backup reasons), then click Add.

Step 6: Click Save

Step 7: Repeat the process to make second filter (The filter pattern field only holds 255 characters and I’ve found so many spam referrers that I need two now). Use this as the filter pattern

.*social-buttons.com|.*simple-share-buttons.com

Common Questions

Will this fix previous data?

No. Unfortunately, this fix will only apply to your new data coming in. If your boss asks you why referral traffic has dropped you’ll have to explain to him that a large portion of it was fake bot traffic that your removed from analytics for more accurate insights to your data.

Why didn’t you just use .htaccess?

I’m glad you asked. There are two reasons.

I don’t know how that works and this was faster.

.htaccess doesn’t block everything. Some of these referrer spam bots have figured out how to hit your Google Analytics script on Google’s server without visiting your website. Since they never came to your website, you can’t block them with .htaccess.

Also, there are benefits to blocking bots in both places. Some of the bots are actually hitting your website so blocking them in .htacess will reduce your server load. Second, even though you’re filtering out the data in Google Analytics, it still may cause sampling error when the free version of Google Analytics uses sample data for reports.

How can I learn more to fully understand what’s going on here and update my filters if more spam bots appear?

Any questions? Any new referrer spam bots that my filter doesn’t cover? Let me know.