To make it easier to follow I split this post into 4 parts (Filter/Clean/FAQ/List):

Author

Analytics advocate

SEO expert

User Experience passionate

Follow me on
Category | Google Analytics
Difficulty |

Remove spam from your Google Analytics historical data

The spam that is already stored in your Analytics (or any data for that matter) can't be permanently deleted. That is why it is important to create the filters to stop receiving junk traffic.

However, you can still clean your past data affected by spam using a segment. 

To help you get started I created a segment template that you just need to fill with your "valid hostname expression" and the pre-built expressions I prepared for you.

Clean segment template for Google Analytics

  1. Import the template from the Google Analytics gallery.
  2. Select the view where you want to import the segment and click create,Import Clean Historical Data Segment
  3. Fill the placeholders with the expressions you built (hostname and 3rd party tools) and the rest with the pre-built expressions below and save.
    You can remove conditions if you don’t need them by clicking on the minus sign to the right. You can also add your own by clicking the OR button
    Google Analytics clean segment template to remove spam and bots from historical data
    0 Valid hostnames

    Remember the hostname regex is the same you created for the hostname filter. Here are the instructions to create the valid hostname expression in case you missed it.

    1 Source
    (brateg|budilneg|buketeg|bezlimitko|biteg|boltalko|begalka|alfabot|arendovalka|bank\-rot|abcdefh|aptechko|bukleteg|abc)\.xyz|(magnet\-to\-torrent|torrent\-to\-magnet)\.com|(baixar|descargar)\-musica|wordpress(\-start|\-crew)|uptime(robot|bot|check|\-alpha|\.com)|vitaly|sharebutton|semalt|ranksonic|share\-button|anticrawler|timer4web|free\-video\-tool|responsive\-test|dogsrun|fix\-website\-er|dailyrank|sitevaluation|seo\-2\-0\.|99seo|top10\-way|(videos|buttons)\-for\-your|best\-seo\-(solution|offer)|buttons\-for\-website|profit\.xyz|dbutton|keywords\-monitoring|platezhka|7makemoney|forum69|kings\-analytics|checkpagerank|pr\-cy\.ru|\-\-(production|website|sale)\.com|(audit|dollars|success|top1|amazon|commerce)\-seo|free\-video\-tool|datract|hacĸer|ɢoogl|slifty\.github|\-liar.ru|3\-letter\-|rencer\.ru|foxweber|free\-fbook|goodwriterssales|tourcroatia|spinnerco|justkillingti|suralink|worldtraveler|oldfaithfultaxi|christopherlane|hollywoodweeklymagazine|losangeles\-ads|anniemation|timdreby|pcimforum|yellowstonesafaritours|autoseo|blogarama|for\-placing|brainwizard|casinos4|ḷ\.com|davidsbag|bestonwardticket|presleycollectiblesm|\-backlinks\.com|phoenicx\.co\.uk|be\-escorts|vidyoze|brasseriebread|helvetiiconsulting|johntrapane|cloudsendchef|theautoprofit|:8888|blog1989|incomekey|amazon\-ads\.ovh|krumble\.net|10bestseo|seo\-watch|blog100|seoservices2018|resell\-seo|auto\-?seo
    2 Language
    \s[^\s]*\s|.{15,}|\.|,|^c$
    3 Page Title
    google-liar|whitehouse\.gov|life\.ru|vice\.com|vc\.ru|rencer\.ru|blackhatworld
    4 Network Domain
    paloaltonetworks|scaleway|kcura
    5 Service Provider
    hubspot|^google\sllc$|^google\sinc\.$|alibaba\.com\sllc|ovh\shosting\sinc\.|microsoft\scorp|facebook\sireland\sltd|online\ssas|evercompliant|early\sregistration\saddresses

    Want to get notified of expression updates and new filters?

After saving the segment, you will be able to see spam-free reports, as long as the segment is selected.

Do you have any questions or feedback?

I've tried to cover every important detail in this guide, however, if there is any part of the guide where you got stuck, let me know in the comments section below.

If this article helped you, consider sharing it or leaving a comment below on your experience, it may help other people! :)need help implementing, configuring, and/or protecting your Google Analytics? I can help

If you need help with this or any other Google Analytics configuration/customization.

Author

Analytics advocate

SEO expert

User Experience passionate

Follow me on
Be the first to comment :)