Definitive Guide to Removing All Google Analytics Spam

This is a PROVEN WORKING SOLUTION with complete filter expressions.

How to Prevent and Remove Spam:

  1. BEFORE YOU START: Make an Unfiltered View!
  2. Implement a Valid Hostname Filter to eliminate ghost visits (like
  3. Implement Spam Crawler Filters to eliminate the targeted spam visits (like, and
  4. Create a Custom Segment with these filters to use for reporting

All the information you need (and more!) is provided below in this step-by-step guide. Filter expressions are updated within a day or two as needed.

Current Spam Filter Expressions

Read the rest of the article below to learn more about how spam has changed over time and how to implement these filters properly. See the bottom of the article for a running list of spam referrals these filters block (updated almost daily).

Valid Hostname Filter: customize to suit your web server domain (see discussion below)

Optional Spam Filter: Custom > Exclude > Campaign Source [2017-09-13]
Valid sources used for spam — include these ONLY if you have no valid referrals from these sites!||^|

Active Spam represents spam sources that may appear in an annual report.

Active Spam Filter 1:  Custom > Exclude > Campaign Source [2017-12-29]


Active Spam Filter 2: Custom > Exclude > Campaign Source [2018-02-15]|||amazon-seo-service||free-fbook-traffic||money-for-placing-articles|||uptime-.*.net|yellowstonevisitortour|*

Active Spam Filter 3: Custom > Exclude > ISP Domain [2017-10-26]

Active Spam Filter 4: Custom > Exclude > Campaign Source [2018-04-06]||

Active Language Filter:  Custom > Exclude > Language Settings [2016-12-13]



Old Spam has not appeared in most Google Analytics reports for over a year.

Old Spam Filter A: Custom > Exclude > Campaign Source [2017-09-13]


Old Spam Filter BCustom > Exclude > Campaign Source [2017-09-13]


Old Spam Filter C: Custom > Exclude > Campaign Source [2017-09-13]||||||||keywords-monitoring(-your)?||

Old Spam Filter D: Custom > Exclude > Campaign Source [2017-09-13]|||stalawfirm|goodwriterssales|||||hollywoodweeklymagazine|tourcroatia|losangeles-ads|oldfaithfultaxi|christopherlane

Old Spam Filter E: Custom > Exclude > Campaign Source [2017-09-13]|||yellowstonesafaritours|||bestonwardticket|malmesburyprinting


Editorial note: please do not take the presence of a domain in this article to mean the related businesses are all ‘spammers’. In several cases, unsuspecting businesses have had their domains referenced by spammers or have unintentionally left referrals and since corrected their practices.






The Google Analytics Referral Spam Solution

There are a lot of partial solutions and misinformation out there about clearing out so-called referral spam (and organic search and event spam too), so here’s the Definitive Guide to removing all of that junk! This article has been constantly updated since January 2015 and has shown over 330,000 people how to get rid of spam in Google Analytics reporting.

2017-01-01: the spammers continue to adapt to various spam fighting techniques, which has recently resulted in at least one free service ( to give up due to the effort required to maintain a working solution. I would like to say thank you to Stijlbreuk for their efforts over the past couple of years. We all believe it is time for Google to make our services unnecessary.  For my part, I will continue to maintain this article for as long as it is needed — Mike Sullivan

Urban Myths and Bad Advice:

  • DO NOT use the Referral Exclusion List – Why?
  • Google Analytics bounce rate DOES NOT affect search rankings
  • Using .htaccess rules or WordPress plugins will NOT eliminate any of the ghost referrals

This is a long article — I have included a lot of background and detail to explain why this solution is so effective, and to dispel a number of urban myths around referral spam. Heed the advice to set up an unfiltered view before you begin — there is no recovery from a bad filter (filtered traffic is gone forever); do not risk your analytics to a typo.

Background: The Many Faces of Referral Spam

spam-201606The problem of fake references in Google Analytics has changed significantly over the past 2 years. In 2014, we had some bots from semalt and buttons-for-website that visited your website and left fake referrals in your analytics. In December 2014, the attacks began taking advantage of a weakness in Google’s new Measurement Protocol that allowed direct attacks on the Google Analytics tracking servers without having to actually visit your website. This is a lot easier than crawling the web looking for new websites. There were a lot of different types of attacks, from many referral sources, leading to a lot of confusion in the industry.

Ranksonic joined in on the fun in March 2015, and the spammers enjoyed playing with new domains and techniques. We have had fake organic search terms ( and fake events (event-tracking) injected into our analytics, too. Enterprising individuals popped up on Fiverr offering hundreds or even thousands of visits from real webmasters obtained using these techniques.

At the beginning of 2016, there were still lots of players pushing through Google’s defenses, even if only for a few days (see image). As of June, 2016, the trend continues with most ghost spam changing in a few days, but the crawlers seem to run for months.

In late 2016, the spam has evolved again, this time focused on inserting a fake Language, and using a rotating series of fake and real sources. This latest blitz also uses valid hostnames on some of the traffic, indicating the spammer is working to get around the common protections people have deployed.

Why hasn’t Google stopped it all yet? Well, they have said they are working on it, but it is a tough fight. Trust me — it would be a LOT worse than it is if they were doing nothing. They just don’t talk about what they are doing, and that is a widely adopted security best practice: never talk about what protections you have in place. It makes it harder for the bad guys to work around your protection systems.

As of summer 2017, Google routinely stops new spam attacks within a day.

BEFORE YOU BEGIN: Create an Unfiltered View

Before you start hacking away at your Google Analytics settings, the best practice for implementing new filters starts like this – create an UNFILTERED VIEW, and a TEST VIEW.


1. Make sure you always have an Unfiltered view in your property — that has absolutely no filters. This will ensure you always have the raw, unmodified data should things go wrong. There is no ‘undo’ for a bad filter.

2. Don’t create new filters directly in your main view. Create a new Test view that mirrors your main view in every other respect, and then add the filter(s) there first. Watch it for a few days and compare with the Unfiltered view to make sure it is doing what it should.

3. If you’re happy with the new filter based on this test, then go ahead and add the ‘existing filter’ to your main view.

1. New Website? Use a ‘-2’ Property

In early 2015, I coined the term “ghost referral” to identify the worst offenders like darodar because they actually NEVER VISIT YOUR SITE. Using some software magic, they post fake hits to Google’s tracking service using a random series of tracking IDs. When they pick a series of numbers that includes your tracking ID, Google records a referral visit from their source in your reports, even though they know nothing about your website and never visited it. A number of people have seen ‘traffic’ to Google Analytics accounts that have never been used…

When you create a Google Analytics Account, you also get a Property and a View. The Property gives you the tracking id (e.g. UA-1234567-1) that you use in the code snippet on your website. You can create 50 Properties in your Account, and they are given -1, -2, -3, … -50 extensions. Most ghost referral spam hits the default ‘-1’ Property, although some are now hitting -2, and -3 properties as well.

You can significantly reduce the spam simply by creating and using a second, third or fourth (or tenth) Property. You don’t have to actually use them all. Caution: changing your tracking code on your website will leave the historical data in the old property, so this is really only useful for new websites, or if you are willing to abandon your old data.


2. Implement a Valid Hostname Filter for Ghost Visits


“Ghost” traffic never actually visits your website — it is injected into the Google Analytics tracking servers and appears in their reports. Javascript filters, WordPress plugins and .htaccess methods are useless at blocking the traffic because there is no traffic to your website. You have no choice but to create a Google Analytics filter to exclude them because they ONLY exist in Google Analytics. The biggest problem with this ghost traffic is that they change as quickly as they appear, so you could be continuously building filters for them.

Source versus Hostname

Real visits to your website from a referral link have TWO server names available: the Source that the link is from, and the Hostname that the landing page is pointing to (your server). In most cases, the Hostname should always be your server, regardless of where the traffic came from.


For example, here is a sample of the Source and Referral Path (page with the link on it) pointing to this article. Notice the Hostname is always my server.


Ghost visits send traffic to a random series of tracking ID numbers — they don’t know your server name! They use blank (“(not set)“) or fake hostname values (like ‘’). That means you can eliminate ALL of them simply by filtering to INCLUDE only the valid hostname — your server.

A. Identify Your Valid Hostnames

STEP CAREFULLY.  Valid hostnames are websites that you have configured to use your Google Analytics tracking ID (e.g. UA-12345678-1). They may include ecommerce shopping carts or telephone call tracking services linked from your website.

valid-hostname-identificationStart with a multi-year report showing just hostnames (Audience > Technology > Network > hostname), then identify the valid ones — the servers where you REMEMBER configuring with your tracking ID (hint: is NOT one of them).

UPDATE: if you have alternate domains that redirect to your main website domain, do NOT include those redirected domains. If you can type in one hostname/URL and it changes to display a page on a different domain, then it is NOT a valid hostname.

Many people have a problem with this step; here’s what I picked and why:

  • – my main website
  • – my help site configured with the same tracking ID
  • – I have a YouTube channel with videos that I track using Google Analytics. I had to configure my tracking code in YouTube (what a pain that was! and it only tracks channel visits, not videos). NOT RECOMMENDED for general use.
  • – I use FastSpring as my eCommerce provider to process payments. I configured it with my tracking code.

There are a number of translation and proxy services that may also record visits to your tracking ID because they display your original content through their servers. If the traffic is low, IGNORE THEM. Spammers have started using as a hostname to bypass people’s filters, so don’t add that one. Most recent example is organic search spam with keywords “beat with a shovel the weak google spots…

FYI – googleweblight is a new service from Google that servers your pages to mobile networks in some parts of the world. It usually appears with your hostname in front, and it’s ok.

I do not have any tracking codes installed on,, or any of the other sites that appear in the report. I never configured my tracking code ON those sites — they are ghost visits!

IMPORTANT: If you see GOAL CONVERSIONS or REVENUE from (not set) hostnames, you need to dig into why. Maybe they are Event-based call logging and are not associated with pageview (which has a hostname value). You may need to adjust your filters and/or tracking code snippets. 

only-my-hostnamesB. Create the Filter Expression

Create a filter expression that captures all of the domains that you consider to be valid. TEST, TEST, TEST! Then move to production when you are sure you have it all. You may find it easier to play with an Advanced Segment, so you can see the effect of your filter without risking any data loss. See #3 below.

Many people have a problem composing the filter expression because it is Regex (regular expressions), so lets keep it really simple in this case.

For your filter expression, simply enter your valid hostname. If you have more than one, separate them by a vertical bar ( | ). If you have a third-party payment service like, you may need to enter it as well.

Note: if you can’t see the “Include” radio button in the Filter page, look BELOW the Exclude section (which is expanded when it is selected). When you select Include, the Exclude section will collapse and the Include section will expand as in the image.

It is not necessary to enter all of the subdomains (like www and help) – Regex will perform a partial match by default, so I keep the expression shorter by simplifying to just the root domains.

Note: in proper Regex, you should ‘escape’ the dots (\.), but since a dot matches any character and the likelihood and impact of a false match is negligible, I sometimes leave them out to keep it simple.||

IMPORTANT: do NOT end the expression with a vertical bar ( | ); use them only between domains.

3. Implement Spam Crawler Filters

Some spammers actually crawl the web and visit your site, and others have figured out what your hostname is, so the Valid Hostname filter won’t keep everything out. For these, you will need to specifically exclude their visits by naming them in a filter.

Note: if you are technically capable, you could block these sources using classic spam blocking techniques like using .htaccess rules. To learn a little more about these alternatives, you can read the article by Carlos Escalera.

Do NOT visit the referring site, since this is an invitation to get a virus or Trojan infection on your computer, or otherwise satisfy the desire of the spammer. I recommend you do a quick Google search first, to see if you can trust it. Spammers are quickly identified, and you’ll usually see indications in the first page of search results.

Creating a New Filter

spam-referral-filterYou can exclude them from your reports in Google Analytics by creating a filter. You identify a “unique signature” that identifies them (and only them), and then create a filter based on that.

Most spam can be eliminated by filtering on Campaign Source. Most people try filtering on Referral, and that filter doesn’t always work because some spammers have used utm codes to stuff values into the Source and Medium, imitating a referral. Note that some of the spam now requires you to filter on the Language Settings field  (Spam Crawler 5 below).


Read Google’s instructions on making filters.

The latest filter expression I recommend at at the top of this article. Note that I take some shortcuts in my expressions to save space (there is a limit to the number of characters). I have not yet found any false matches for valid referrals in any of the web properties I have worked with, but you should be cautious of being too aggressive — I have seen some people recommend filtering on simple words like buy|cheap|motor|money|seo which will simply match far too many valid domains to be recommended.

As you discover new spammers you will have to add to the filters. Remember: these filters will exclude everything that matches, so be careful with your expressions, and TEST, TEST, TEST first.


4. Create a Custom Segment

To eliminate spam immediately from all of your reports, even historical reporting, you need to use a Custom Segment. If you have prepared the filter expressions above, you’ve already done all the hard work. If you skipped to this section, go back and start at Step 1.

Start with a copy of my segment from the Google Analytics Solution Gallery [2016-12-22], and modify it to suit, or follow these instructions:

In Google Analytics, open your Reporting view, and click +Add Segment.


Then click New Segment and enter a name like “All Users (No Spam)“. If you have multiple websites in your account, you should include the website in the name, like “All Users (AnalyticsEdge)“.


Select the Advanced > Conditions tab on the left. Create a new entry for the valid hostnames:

  • Sessions > Include
  • Hostname > matches regexyour valid hostnames expression (#1 above)

Then click + Add Filter and add the expressions for the Spam Crawlers:

  • [+Add Filter]
  • Sessions > Exclude
  • Source > matches regexspam crawler expression #1    OR
  • Sessions > Exclude
  • Source > matches regexspam crawler expression #2    OR
  • repeat for the rest of the filter expressions

Save and Apply the Segment

The easiest way to test is to use your new segment in combination with the default All Users segment, comparing the Sessions counts. You can find your new segment listed in the Custom grouping. You can select BOTH your new segment AND the All Users segment to compare.

Sharing your Segment Definition With Coworkers

segment-collaborationGoogle Analytics segments are normally account-specific, but a new feature allows you to share it with other people that have access to the same Google Analytics view. When editing the segment, click the link in the upper right corner and allow Collaborators to apply/edit the segment,

5. Turn On Google’s Bots & Spiders Option

bots-and-spidersGoogle Analytics has a simple checkbox you can use to exclude easy-to-identify bots and spiders, but you have to enable it for every View you use. In your Google Analytics Admin section, navigate to each View you use, select View Settings, and check the box to Exclude all hits from known bots and spiders.

This feature has recently started affecting referral spam as well (e.g. / referral), so TURN IT ON!



That’s It – You Are Spam-Free For Now!

What made me an expert about spam?

My name is Mike Sullivan; I am a Google Analytics Certified professional, and a Top Contributor in the Google Analytics community forum. I have been working extensively with the Google Analytics API since 2010, providing customized reporting solutions. I founded Analytics Edge in 2013, making a suite of free and inexpensive Excel report automation add-ins and connectors.

Spam was hounding my customers, so I dug into the problem with all the tools at my disposal and thought I’d share what I learned. I wrote this Definitive Guide, coining the term “ghost referrals”, to help resolve the confusion surrounding the various spam types and the different techniques required to deal with them.

I hope this article has helped you.

Historical list of spam sources detected

  • 2018-04-06 / referral crawler spam (
  • 2018-04-04 / referral crawler spam
  • 2018-03-18 / referral crawler spam
  • 2018-03-09 / referral crawler spam
  • 2018-02-26 / referral crawler spam (
  • 2018-02-15 / referral crawler spam
  • 2017-11-22 / referrer ghost spam
  • 2017-11-22 / referral crawler spam
  • 2017-11-13 / referral crawler spam
  • 2017-10-24 / referral crawler spam
  • 2017-10-14 / referral crawler spam
  • 2017-10-05 / referral crawler spam
  • 2017-09-28 / referral ghost spam
  • 2017-09-15 / referral ghost spam
  • 2017-09-13 reorganized filters to reflect active and old spam sources
  • 2017-08-17 / referral crawler spam
  • 2017-08-15 malmesburyprinting / referral crawler spam
  • 2017-08-03 / referral crawler spam
  • 2017-07-30 / referral crawler spam
  • 2017-07-26 ḷ.com /referral crawler spam
  • 2017-07-17 / referral ghost spam
  • 2017-07-06 / referral ghost spam
  • 2017-07-03 / referral crawler spam
  • 2017-07-03 / referral crawler spam
  • 2017-07-03 money-for-placing-articles / referral crawler spam
  • 2017-06-27 / referral crawler spam
  • 2017-06-27 yellowstonesafaritours / referral crawler spam
  • 2017-06-23 / referral crawler spam
  • 2017-06-23 / referral crawler spam
  • 2017-06-17,, christopherlane / referral crawler spam
  • 2017-06-16 / referrer crawler spam
  • 2017-06-13 / referrer crawler spam
  • 2017-06-13 / referrer crawler spam
  • 2017-06-13 / referrer crawler spam
  • 2017-06-13 / referrer crawler spam
  • 2017-06-13 yellowstonevisitortours / referrer crawler spam
  • 2017-06-13 hollywoodweeklymagazine / referrer crawler spam
  • 2017-06-09 / referral crawler spam
  • 2017-06-09 / referral crawler spam
  • 2017-06-02 / referral crawler spam
  • 2017-05-29 keyword spam
  • 2017-05-29 keyword spam
  • 2017-05-18  <words> cdn / keyword spam
  • 2017-05-15 / referral spam crawler
  • 2017-04-27 /referral ghost spam
  • 2017-04-11 / referral ghost/crawler spam using hostname and Election.Interferencer.Ru language settings
  • 2017-04-09 / referral ghost spam
  • 2017-04-05 / referral ghost spam
  • 2017-04-02 / referral ghost spam
  • 2017-03-30 / referral spam crawler
  • 2017-03-26 / referral spam crawler
  • 2017-03-20 / referral ghost spam
  • 2017-03-20 / referral spam crawler
  • 2017-03-20 / referral spam crawler
  • 2017-03-15 ^ / referral ghost/crawler spam temporarily added
  • 2017-03-09 / referral ghost spam
  • 2017-03-01 / referral ghost/crawler spam temporarily added
  • 2017-02-24 / referral ghost/crawler spam temporarily added
  • 2017-02-22 / referral crawler/ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-02-20 / referral ghost spam
  • 2017-01-25 / referral ghost spam
  • 2017-01-25 / referral ghost spam
  • 2017-01-05 / referral ghost spam
  • 2017-01-01 “ – – – all world watching these videos” keyword and landing page spam
  • 2016-12-20 / referral SPAM CRAWLER
  • 2016-12-20 “Congratulations to Trump and all americans” language spam using referral
  • 2016-12-09 / referral ghost spam
  • 2016-12-09 “Google officially recommends search shell!”  / language spam may have valid hostname, valid or fake referral sources
  • 2016-12-05 “ search shell is much better than google!”  / language spam may have valid hostname, valid or fake referral sources
  • 2016-11-30 / referral SPAM CRAWLER
  • 2016-11-30 lifehacĸ / referral SPAM CRAWLER
  • 2016-11-29 / referral ghost spam
  • 2016-11-06 “Secret.ɢ You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!” / language spam may have valid hostname, valid or fake referral sources
  • 2016-10-26 / landing page spam
  • 2016-10-26 / landing page spam
  • 2016-10-26 various keyword combinations of with social, share, buttons, website, this, html, linked, in, add, and other words
  • 2016-10-25 / referral SPAM CRAWLER
  • 2016-10-24 24× / referral ghost spam
  • 2016-10-12 “cdn” organic keyword ghost spam
  • 2016-10-11,,,,,, / referral ghost spam
  • 2016-10-02 – / referral SPAM CRAWLER
  • 2016-09-24 – / referral ghost spam
  • 2016-09-10 –,,,,,,,,,,,,,,,,,,,,,,,,,, scanner-walt, scanner-walter, / referral ghost spam
  • 2016-08-30 –,,,,,,,,,,,,,,,,,,,,,,,,, / referral ghost spam
  • 2016-08-27 – / referral ghost spam
  • 2016-08-23 – / referral ghost spam
  • 2016-08-22 – / referral ghost spam
  • 2016-08-18 –,,, / referral ghost spam
  • 2016-08-18 – / referral SPAM CRAWLER
  • 2016-08-18 – / referral SPAM CRAWLER
  • 2016-08-12 – / referral SPAM CRAWLER
  • 2016-08-12 –,,, / referral ghost spam
  • 2016-08-09 –,, / referral ghost spam
  • 2016-08-03 – / referral ghost spam
  • 2016-08-02 – / referral SPAM CRAWLER
  • 2016-08-02 – / referral ghost spam
  • 2016-07-30 – / referral ghost spam
  • 2016-07-30 – / referral ghost spam
  • 2016-07-28 – / referral ghost spam
  • 2016-07-27 – / referral ghost spam
  • 2016-07-26 – / referral ghost spam
  • 2016-07-25 – / referral ghost spam
  • 2016-07-21 – / referral ghost spam
  • 2016-07-21 –,,,,,,,, / referral ghost spam
  • 2016-07-21 –,,,,,,,,, referral ghost spam
  • 2016-07-20 – / referral ghost spam
  • 2016-07-20 – / referral ghost spam
  • 2016-07-18 – / referral ghost spam
  • 2016-07-17 – / referral ghost spam
  • 2016-07-16 – / referral ghost spam
  • 2016-07-16 – “ …” organic keyword ghost spam
  • 2016-07-15 – / referral ghost spam
  • 2016-07-13 – / referral ghost spam
  • 2016-07-11 – / referral SPAM CRAWLER
  • 2016-07-08 – / referral ghost spam
  • 2016-07-08 – eu-cookie-law.blogspot.* / referral ghost spam
  • 2016-07-08 – free-share-buttons.blogspot.* / referral ghost spam
  • 2016-07-04 –,,,,,,,,, / referral ghost spam
  • 2016-07-01 – free-share-buttons-???.xyz / referral ghost spam
  • 2016-06-27 – / referral ghost spam
  • 2016-06-19 – / referral ghost spam
  • 2016-06-19 – law-enforcement-check-*.xyz / referral ghost spam
  • 2016-06-19 – free-social-buttons-???.xyz / referral ghost spam
  • 2016-06-17 – / referral ghost spam
  • 2016-06-16 – organic keywords ghost spam
  • 2016-06-11 – law-enforcement-bot-??.xyz / referral ghost
  • 2016-06-08 – social-buttons-??.xyz / referral ghost spam
  • 2016-06-04 – law-enforcement-??.xyz / referral ghost spam
  • 2016-06-04 – / referral SPAM CRAWLER
  • 2016-05-31 – / referral ghost spam
  • 2016-05-31 – / referral ghost spam
  • 2016-05-31 – / referral ghost spam
  • 2016-05-29 – / referral ghost spam
  • 2016-05-28 – / referral ghost spam
  • 2016-05-28 – / referral ghost spam
  • 2016-05-28 – / referral ghost spam
  • 2016-05-27 – / referral ghost spam
  • 2016-05-27 – cookie-law-enforcement-??.xyz / referral ghost spam
  • 2016-05-27 – / referral ghost spam
  • 2016-05-27 – / referral ghost spam
  • 2016-05-27 – / referral SPAM CRAWLER
  • 2016-05-27 – / referral ghost spam
  • 2016-05-27 – / referral
  • 2016-05-25 – organic keywords ghost spam
  • 2016-06-23 – / referral ghost spam
  • 2016-05-20 – / referral spam crawler
  • 2016-05-20 – / referral ghost spam
  • 2016-05-18 – / referral ghost spam
  • 2016-05-16 – / referral ghost spam
  • 2016-05-08 / referral ghost spam
  • 2016-05-05 / referral ghost spam
  • 2016-05-04 / referral ghost spam
  • 2016-04-30 / referral ghost spam
  • 2016-04-28 / referral ghost spam
  • 2016-04-26 / referral ghost spam
  • 2016-04-25 ‘i came up with a method and 1,5 years forcing…’ ghost organic keywords
  • 2016-04-25 lots of other ghost organic keywords, including,,, and others
  • 2016-04-25 / referral ghost spam
  • 2016-04-18 / referral ghost spam
  • 2016-04-18 / referral ghost spam (# is 2, 3, 6, 7, etc)
  • 2016-04-17 and / referral ghost spam
  • 2016-04-14 / referral crawler
  • 2016-04-11 / referral ghost spam
  • 2016-04-10 and / referral ghost spam
    2016-04-09 / referral spam crawler added to filter expressions
  • 2016-04-08 / referral ghost spam
  • 2016-04-01 /referral and яндех-херня.рф / referral ghost spam
  • 2016-03-23 / referral and / referral added to spam crawler filters
  • 2016-03-23 / referral ghost spam
  • 2016-03-21 referral ghost spam
  • 2016-03-18 /referral ghost spam
  • 2016-03-15 / referral ghost spam
  • 2016-03-10 / referral spam crawler
  • 2016-03-05 / referral spam crawler
  • 2016-03-03 / organic search from hostname ghost spam
  • 2016-03-03 / referral spam crawler
  • 2016-02-28  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam  / referral ghost spam
  • 2016-02-27  / referral ghost spam
  • 2016-02-16 / referral ghost spam
  • 2016-02-10 китай.с.новым.годом.рф / referral ghost spam
  • 2016-01-26 / referral ghost spam
  • 2016-01-22 / referral ghost spam (
  • 2016-01-22 / referral ghost spam (
  • 2016-01-20 / referral ghost spam (
  • 2016-01-20 / referral ghost spam (
  • 2016-01-20 / referral ghost spam (
  • 2016-01-20 / referral ghost spam (
  • 2016-01-13 / referral spam crawlers
  • 2016-01-03 / referral ghost spam (
  • 2016-01-01 с.новым.годом.рф / referral (ilovevitaly) ghost spam
  • 2015-12-31 / referral (ilovevitaly) ghost spam
  • 2015-12-29 / referral ghost spam (
  • 2015-12-25 referral ghost spam  ( /
  • / referral ghost spam (
  • / referral ghost spam (
  • / referral ghost spam
  • / referral spam crawlers
  • / referral spam crawlers
  • / referral ghost spam (
  • referral ghost spam (
  • / referral ghost spam (
  • / referral ghost spam (
  • 2015-12-22 / referral ghost spam
  • 2015-12-21  / referral ghost spam
  • 2015-12-20 / referral ghost spam
  • 2015-12-19 / referral ghost spam
  • 2015-12-14 ^ /referral added to spam crawlers filters
  • 2015-12-09 / referral (ilovevitaly) ghost spam
  • 2015-12-08 / referral ( ghost spam
  • 2015-12-08 / referral ( added to spam crawler filters
  • 2015-12-04 / referral ghost spam
  • 2015-12-04 / referral ghost spam
  • 2015-12-02 / referral ghost spam
  • 2015-12-01 / referral ghost spam
  • 2015-11-27 /referral ghost spam
  • 2015-11-27 / referral ( added to spam crawler filters
  • 2015-11-27 / referral ( ghost spam
  • 2015-11-27 / referral ghost spam
  • 2015-11-26 / referral ghost spam
  • 2015-11-26 / referral ghost spam
  • 2015-11-24 / referral ghost spam
  • 2015-11-23 / referral ( ghost spam
  • 2015-11-20 / referral added to spam crawler filters
  • 2015-11-19 / referral ( ghost spam
  • 2015-11-18 / referral ghost spam
  • 2015-11-18 / referral ( ghost spam
  • 2015-11-17 / referral ( ghost spam
  • 2015-11-16 /referral ghost spam
  • 2015-11-16 / referral ( ghost spam
  • 2015-11-16 / referral spam crawler
  • 2015-11-16 / referral spam crawler
  • 2015-10-08 /referral spam crawler
  • 2015-10-04: / referral spam crawler
  • 2015-09-21: / referral ghost spam
  • 2015-09-21: / referral: some spammers don’t know what they are doing
  • 2015-09-16: / referral ghost spam
  • 2015-09-15: added to spam crawler filters
  • 2015-09-01: which redirects to
  • 2015-09-01: which redirects to
  • 2015-08-26: ghost spam is free from the politics, we dancing like a paralytics / organic keywords
  • 2015-08-15: / referral
  • 2015-08-13: / referral**
  • 2015-08-13: / referral
  • 2015-08-09: / referral
  • 2015-08-09: / referral
  • 2015-08-05: / referral
  • 2015-08-05: / referral
  • 2015-07-29: / referral
  • 2015-07-24: / referral
  • 2015-07-20: / referral
  • 2015-07-02 / referral
  • 2015-06-26 / referral
  • 2015-06-18 / referral
  • 2015-06-09 / referral and organic
  • 2015-06-04 / referral
  • 2015-06-03 непереводимая.рф / referral
  • 2015-06-01 непереводимая.рф / organic
  • 2015-05-29 / organic
  • 2015-05-27 / referral
  • 2015-05-26 / referral
  • 2015-05-21 / organic
  • 2015-05-19 / organic
  • 2015-05-15 / referral and / referral and / referral
  • 2015-05-06 / referral, / referral, / referral and some spikes of direct traffic (direct) / (none).
  • 2015-04-28 (google / organic) search spam with keyword “vitaly rules google…”
  • 2015-04-24 ( / referral, / referral, / referral, / referral, / referral, / referral, / referral, / referral, / referral)
  • 2015-04-06 ( / referral) and ( / referral) and
  • 2015-04-02 / referral
  • 2015-03-26 / referral
  • 2015-02-23 / referral
  • 2015-03-16 / referral and
  • 2015-03-11
  • 2015-03-04 / referral
  • 2015-02-25: / referral
  • 2015-02-11:
  • 2015-02-04: / referral
  • 2015-01-27: / referral
  • 2015-01-19:  “google officially -recommends search shell” and “resellerclub scam” organic
  • 2015-01-15: “ / referral
  • …and more…

Comments: (moderated, no spam)

  1. Lenin Nair (ZoomOwl)

    Mike, thanks for this wonderful article. It’s such a great resource. I have one suggestion. You could create an excel sheet out of the spam domains and make it available as a download. What say?

    1. mike_sullivan

      Sorry. I spend very little time updating this document with spam filter expressions, and most of the domains are not active in GA. There is no real incentive for me to maintain another format.

  2. ralph

    Thanks for the excellent article, Mike. We are getting a lot of spam traffic from bots using Language = “c” and we’re excluding this traffic with the following regex, which I found in another article: \s[^\s]*\s|.{15,}|\.|,|^c$

    I noticed that your language filter does not account for this “c” language code. Is there a reason for this?

    The sessions I see across my properties are all 1 page/session.

    1. mike_sullivan

      The ‘c’ language code has been around for a couple of years, and it seems to be a misconfigured client application. In some cases, there are real transactions from visitors with this code, so I have not identified it as 100% always spam and included it in the filters.

      The traffic patterns are generally hitting shopping sites, and maybe they are shopping comparison bots or affiliate-related. While a lot of direct, there are also referrals and even AdWords clicks in some properties.

      If you are only seeing direct and never any transactions, and the traffic is high enough to bother you, go ahead and filter. Just make sure you have an unfiltered view and check it monthly to make sure it doesn’t start collecting transactions or other conversions.

      1. ralph

        Hi Mike, thanks. I’m looking at ~20 international properties with millions of monthly visitors, and the vast majority of the “c” language code sessions have 1 page/session and do not generate any type of conversion events (registrations, etc). There is only one property with a handful of sessions from Brazil that have this language code and have slightly > 1 page/session, but still no events. So it looks mostly like spam traffic. I’ll keep an eye on it.

  3. fiona

    Hi, I’m seeing a traffic source showing in my GA dashboard as an inbound traffic type /refrred medium – […reference removed…]
    How can I block this and change my GA reporting to exclude it? Thanks!

    1. mike_sullivan

      AS in the article, create a filter to exclude the source (Campaign Source) or medium (Campaign Medium) that matches exactly what you see if the source or medium fields in your reports. That will prevent FUTURE hits from being recorded. To remove it from your reports, you need to use a segment with the same filter as described in section 4.

  4. iain_barker

    Very useful guide. Complicated subject, so it took a while to figure out. Glad I had this helpful resource to refer to.

  5. Felicity

    Is there anyway to get rid of Landing Page Spam from google analytics? I have just noticed a list of landing pages showing up in my account that have nothing to do with my site. For example here are a few that list under landing pages: /oykv/om-sera-mega-record-2017.html; /index.php/distant/1901-uni/; /oykv/download-vedio-geet-saat-bulan-madu.html etc

    I can’t find any help on this so hoping someone will have the answer?

    1. mike_sullivan

      this is usually an indication your site was hacked. check if those pages are real… if not, you can filter by Request URI. That is the same as page.

  6. Rahul

    I need help. We are getting a new kind of Ghost SPAM. Few of our paid campaign showing user coming from Taboola, Outbrain but those users r not counted towards bill and those user do not enter on site and have a page view ratio of less than 0.10. Neither these user show in logs.

    1. mike_sullivan

      Agreed – it is not a spam site, but it was used in a referral spam ‘attack’ causing a large number of false referrals in March of this year. There are a number of other domains in a similar situation — I will re-organize the filters to make that clearer.

  7. Tessa

    Hi Mike, thanks for your work. As a newbe in this field, you’re article gave me much insights. However, I applied the Valid Hostname filter, but as someone already mentioned, now I only see 0 visits to our website the last month.
    All the hostnames I included are valid. Our main website is but when you e.g. visit you also see that synapsebv website, but you are not redirected, so in the url it still says So I guess it is a valid hostname, like you explained?
    I tested all the aliasses this way and they are all valid. However, GA filters them all out. Here is how I e.g. entered the field (custom/include/hostename): www\||
    We have more hostnames, but I don’t show them here. I also tested without www\. but nothing works.

    Could you please help out here? Thanks! Regards, Tessa from the Netherlands

    1. mike_sullivan

      If you have a long list, drop the ‘www.’ and the ‘.com’ — they are not actually necessary. Do NOT NOT NOT NOT start or end your list with a vertical bar character.

      synapsebv|clottingphysiology|plasminoscoop would be fine.

  8. Murray

    I created the custom segment and just applied it to a new GA account. But I noticed it has filtered out all Social traffic as well. Why would this be? I’m only using the 6 spam filters you outlined above

    1. mike_sullivan

      Unsure why this would happen for you. In your report (without the segment), try setting the Secondary Dimension to Hostname to see whether the social traffic is being recorded with a valid hostname or not. Maybe you are tracking it as events instead of pageviews, and your tracking snippet does not set the hostname for the events…???

  9. Paul de Fombelle

    Fantastic work, thank you. I read a lot of incomplete content about this issue before landing here.

    There is one identified source of Google Analytics spam that you didn’t mention:

    -Direct traffic
    -Correct hostname
    -100% new users, 100% bounce, avg. session duration 00:00:00
    -Service provider: ovh hosting inc
    -All traffic comes from specific cities: in my case Farmington (USA) and Macapa (Brazil)
    -I read that IP address seems to be, but I don’t know how to check this (seems to be a known IP:

    I’m affected by this, and it looks like a lot of other people are. Are you aware of it?

    Again, thank you for your amazing work.

    1. mike_sullivan

      Yes, I am aware of it, and a few of my customers have specific filters to remove it, but as I said to Donna, it may be worth blocking the traffic as opposed to just filtering it out of GA. Some of the ecommerce bots do more than just collect data — some try to reserve inventory by putting things into shopping carts. This is all outside of my area of specialty.

  10. Donna Duncan

    Hi Mike,
    I’m wondering if you have a suggestion for how to deal with Amazon’s bots that artificially inflate traffic and bounce rates.

    1. mike_sullivan

      First, I think you mean the amazonaws bots which are running on their cloud server farms. Many are targeting specific websites for various reasons. You can try filtering by network domain or service provider, but you would be better to try blocking by .htaccess file and IP address ranges since these bots can sometimes be used for not-so-nice purposes to mess with your ecommerce platform. This is all outside the scope of this article, and can be a lot more technical.

  11. Dandelion

    Here’s a followup question. I’ve had an issue with I see that you reference them on your Historical List several times. Yet they aren’t in your filter expressions. I assume because they aren’t a .com? Should I just create a stand alone exclude by campaign source filter for this one and others that have different domain extensions?

  12. Dandelion

    I’ve wanted to write for a long time and say “THANK YOU” for taking the time to write up this guide! It has meant so much to have reliable information with step by step instructions I can actually apply!!

    I have created new properties for all my young sites and I’ve applied the hostname include filter (first to test view, then to master). Now I’m ready to apply step 3 to my sites but I am a little confused.

    Should I create exclude filters for all 6 of the expressions you have at the top of the article?

    And, is there a reason why they aren’t in any particular order? That confused me a bit. First there’s one from 2015, then a few from March 2017, but not always following reverse chronology. So I thought I might be misunderstanding something.

    1. mike_sullivan

      Yes, all 6 are needed. No order…some were modified to drop old temporary entries and add newer ones.

  13. Paul

    I am getting a number of referrals from a domain but it does not seem to be included in the filters. appears to be an ad platform, but the referrals are 100% bounces. Is this a spam referrer that others are seeing.

    1. mike_sullivan

      I have not seen this in any of the accounts I monitor, so it is not widespread — it could be targeted. Contrary to popular opinion, 100% bounce rate does not automatically mean spam. You need to look at landing pages, city/country of origin, and browser/browser version. Another telltale is whether the referral left in your account takes you somewhere that does not have a link to your site. Since is an advertising platform, and the server is ‘adspreview’, it could be from an ad that you (a customer?) or an affiliate is running. It is very common for poorly constructed ad campaigns to produce 100% bounce rates.

  14. Tim Rowley | Web 4 Panama

    I’ve looked through many and this is absolutely the best guide to Analytics spam filtering out there. This is so helpful.

  15. Phil

    The last few nights I have been doing some serious research on this topic. All of the sudden my daily visits shot up and I could tell something wasn’t right about the traffic. It is irritating that they started all of a sudden. Oh well. Thank you for the write up and suggestions.

  16. Jamie

    Why are alternate domains/domains that I redirect to my main website not valid hostnames that I should include in my reports? Even though they are not the primary domain, don’t I still want to track those hits in Google Analytics?

    1. mike_sullivan

      If you type in the alternate domain and your browser automatically redirects you to your main domain (as shown in the browser address bar), then no one would ever actually ‘visit’ the alternate domain — they ‘land’ on your main domain. Your alternate domain should not be included in the valid hostname filter.

      If you type in the alternate domain and your browser shows your website content with the alternate domain in the browser address bar, then people can visit that domain, and it should be included in the valid hostname filter.

  17. Murray Finlayson

    Hi Mike,
    Wondering what you can tell us about MJ12Bot?
    Most of my clients are hosted on Shopify and they all seem to have this listed in the robots.txt. I have tried removing it, but it won’t seem to go away.
    It seems to hammer the (Shopify) server, so when ahrefs (fully legitimate) tries to crawl the site they receive an error: ‘429 Too Many Requests’. The problem is ahrefs then reports no backlinks, which subsequently impacts ahrefs (and I believe) MOZ metrics.
    My theory may be complete BS, so would appreciate your views on MJ12Bot? Perhaps it is completely harmless?

    1. mike_sullivan

      Not my area of specialty, but I understand you can’t change the Shopify robots.txt. Crawlers are the responsibility of the organization running them — it is their problem to deal with the 429 error, not yours. If they fail, they should return to crawl another day – that is generally how they work. If they get 429 errors, they should back off and crawl your site slower. If that were the whole situation, it should resolve itself in time. There is nothing to do, especially if the bot is for link metrics usage only (as opposed to search engine discovery).

      But…there are a number of not-so-nice bots hammering ecommerce servers for a variety of reasons, and Shopify likely throttles them to prevent real people from experiencing delays. From a hosting perspective, bots that do not respect the robots.txt file should get throttled or blocked.

  18. thomas

    Mike fantastic Blog thx.

    I just implemented a language spam filter. However the filter only allowed my to use 255 characters. So do I have to set up several language filters?
    Further, is it just my feeling or did Analytics get rid of quite a lot of language spam by January 1, 2017?

    1. mike_sullivan

      Setting up a language spam filter is a waste of time right now –it all stopped before New Years.

      Yes, there is a limit to the length of a filter, but why would you need a long one for language? The short little regex expression I provide is just as (if not more) effective.

    2. Alex Denne

      Hey Thomas,

      The language filter is just “.{13,}|\.”

      So you shouldn’t have an issue with a character limit there.



  19. Chip

    After applying this, the only issue now is that ALL referral traffic has been removed from my reports and I know that there is legitimate referral traffic being filtered out. How do we rectify this? Thank you.

    1. mike_sullivan

      What can I say….you did something wrong. You have added an extra vertical bar ( “||” ) in an expression, or ended an expression with one (“…|”) – those are the common mistakes. The expressions in the article are in active use in hundreds or properties and work.

  20. hatwar

    Hi Thank for the post
    I applied all the rules mentioned. After that something strange has happened my hostname source is showing zero from the very beginning of the site, more than a year. Has no one ever visited the site

    add up to this.. when i set the host name to (not set) it shows 100% sessions with the website url 0%. Are they any hosting issues .. Unfiltered view and master view are providing same statistics for one day after it has been set.
    Are there any problem with hosting?

    1. mike_sullivan

      Re-read the section on hostname filter carefully. If you get it wrong, it will let nothing through – practice with the Segment as described in the last section.

      If your hostname report ONLY shows (not set) listed as a hostname, then yes, there is NO REAL TRAFFIC being recorded in that Google Analytics account. This does happen to people. The usual reason is that the tracking code snippet required is not on your website. That is a Google Analytics setup requirement — it often gets dropped or forgotten during website updates.

  21. Michael

    Just recognised you cant set a 2 dimensional filter for a view.
    That force me to exclude the USA at all.

    1. mike_sullivan

      If the traffic is actually ‘spam’ it would leave something behind that points you to a website. Since this traffic does not seem to do that, I think it may be ‘real’ traffic that is somehow directed to your website…possibly in error, or possibly by someone else for unknown reasons. Facebook traffic typically appears as spikes because of the nature of the Facebook feeds — things appear at the top for a brief time then quickly get pushed down the page.

      To filter any traffic you don’t want, first identify the UNIQUE combination of things — in your case, you mentioned a campaign ID behind a query parameter. I would filter on that. I do not recommend filtering by country unless you are a local-only business. Make sure to keep an UNFILTERED view just in case this turns out to exclude real traffic by accident.

      1. Michael

        Thanks for the answer.

        This FB Traffic has a spike only in 1 hour. If it would be normal FB Traffic it should have gone over some more hours.
        Unfortunatelly combining does not work.
        But I am afraid that is is real traffic, but false one.
        I cant use the parameter, because some seems to be ok.
        I will try to find a way to get rid of it. Normally I wont filter a whole country but it is a local store so the collateral damage should be very low.

  22. Michael

    Hello Mike,

    thanks for caring about this topic.
    I recognised a lot of facebook referring traffic. It appears in spikes. The bouncrate is nearly 100%. The host name is valid. The traffic come from the USA, while the website is in Europe and has no business in the USA. First it was just one city Oshkosh. Nowadays there are 7 citites left, after I filtered Oshkosh.
    When a spike hits, it is about a third of the daily traffic.
    What also marks it as spam is that the traffic appear in midnight.

    The only special about this traffic that it puts a Facebook campagin ID behind a query parameter (‘s=’).
    Do you know anything about that? Maybe it is some kind of spam you dont mentioned yet.

    I will start filter the parameter in combination with the USA. Do you have any other suggestions?

  23. Hans_F

    Is there an easy way to do automated reporting with these spam filter segments? I work with a lot of different accounts and changing the spam segments manually to include the specific hostname is taking up quite some time. I want to automate my reporting so that me and my colleagues can work more efficiently.

    I’ve been looking for an answer but couldn’t really find a good solution to fully automate this proces.

  24. Gabriela

    I just loved this post, is the best spam removing tutorial i’ve ever read. Thanks for it and for updating it all the time.

    I have a question: when you create a custom segment and you write REGEX you aren’t scaping dots and – … is it right to write it like this:|||

    or it would be correct to scape characters like this:


    I’m not sure how the regex will work if I don’t scape those characters.

    1. mike_sullivan

      The proper term is ‘escape’ the dots, which are special characters in Regular Expressions. By default, they mean ‘any character’. In a lot of my filters, I do bother with the escape character (“\.” instead of “.”) because there is a very, very remote possibility that a character other than the dot itself could result in a match. The filter expression has a character limit, so those extra characters would force extra filters to be made. To be correct and safe, escape the dots.

  25. Daniel Ndukwu

    I really appreciate this post, That Donald Trump Spam was really skewing my analytics data.

    I feel like a spam fighting boss right now.

  26. Jan

    Hi Mike, thanks a lot for the good work!
    I imported the segment from the Analytics Solutions Gallery and noticed that sometimes you use the top level domain extension (.com, .ru) and sometimes you don’t. Is there a specific reason for this difference?

    1. mike_sullivan

      The expression needs to match spam but not real sources. Sometimes there is a valid source domain with a different TLD.

  27. Anita

    Hello Mike,
    thanks for this great article.
    I have two questions:
    I have found a similar article and for the Language spam filter the other article suggests to use

    you suggest

    Can you explain the difference please?

    It seems that you are updating the Spam Crawler Filter Expressions on a regular basis. Will you do that in the future, too?
    So all I would have to do is, to visit your site an apply the new Filter expressions (if they suit for my site). Is that correct?

    (I am not only applying this on my GA I am also writing an article in german and I will link to your article as well)
    Thank you!

    1. mike_sullivan

      The other expression includes a criteria about spaces, 15 characters instead of 13, and commas. You could use that if you want. The key is that it must match the spam but not a real language.

      Yes, I have been updating the expressions for the past 2 years and will continue to do do.

  28. Ron

    Recently i created my google analytic account and associate with my google search console. I have noticed some suspicious activities in my Language section. When I go to Audience > Overview the i find certain suspicious characters in the Language section (beside Demographic). Looks like spams to me. I showed the screenshot to an expert and she old me that those are referral spams. How to get rid of them?

  29. Vivek Patel

    Hi Mike,

    Few of us have notice language spam “Vitaly rules google ☆*:。゜゚・*ヽ(^ᴗ^)ノ*・゜゚。:*☆ ¯\_(ツ)_/¯(ಠ益ಠ)(ಥ‿ಥ)(ʘ‿ʘ)ლ(ಠ_ಠლ)( ͡° ͜ʖ ͡°)ヽ(゚Д゚)ノʕ•̫͡•ʔᶘ ᵒᴥᵒᶅ(=^ ^=)oO” “Google officially recommends search shell!”

    While the hostname for these, and

    Is it a good idea to create exclud filter for hostname?

    If anyone can guide me, it will be appriciated. :)

    Thanks in advance!

  30. Barry

    You’ve probably already noticed, but it looks like there’s new language spam which has no ‘.’ in it:

    Vitaly rules google ☆*:。゜゚・*ヽ(^ᴗ^)ノ*・゜゚。:*☆ ¯\_(ツ)_/¯(ಠ益ಠ)(ಥ‿ಥ)(ʘ‿ʘ)ლ(ಠ_ಠლ)( ͡° ͜ʖ ͡°)ヽ(゚Д゚)ノʕ•̫͡•ʔᶘ ᵒᴥᵒᶅ(=^ ^=)oO

    Can you please update with how to get around that one!? Thanks!


  31. Julio Siqueira

    Hi, Mike!
    First of all, thanks for the great explanation/tutorial on how to deal with these referral spams. It’s really helpful.
    Secondly, I’ve also noticed some of this spam shows up in the social section of analytics. Any specific thing to do about this or is it already covered in the filters you mentioned?

  32. vera...obmana

    i can see that for these fake refferals, like,, lifehacĸ, the “network domain” is

    is there a way to filter our “network domain”? i tried but it was not in the selection for exclude filter

    1. mike_sullivan

      I do not recommend filtering by domain if the domain is a generic ISP such as (that’s a hint…ISP domain). Also, the spammer uses a lot of other ISPs, so the filter is of limited use.

  33. Shailendra Dubey

    Hi Mike,

    Thanks for sharing useful article.

    My problem is that i am getting spam referrals with valid host-name. Below is the sample of the report

    Referral Path Hostname

    How can i handle this?

    1. mike_sullivan

      Yes, the latest spam attacks have used valid hostnames for some websites. The lifehacker (with a weird ‘k’) would be blocked by the Spam Crawlers 4 expression – use that in your segment.

  34. Irene

    Hi everyone!

    This article is great, I implemented all the filters and I block all the spam for now, thank you very much.

    I only have a doubt. Although I don’t see the spam referral sources anymore in GA Acquisition, I still can see them in Real Time. Is that normal? Maybe I made some mistake implementing the filters? I talk specifically about

    Thank you in advance!

    1. mike_sullivan

      Yes, it is normal to see some spam in the real time views but not in the main reports. That is your filters (and Google’s) at work.

  35. Ady Jo

    I’ve been trying to filter several Ghsot Referral sites, but the same ‘…would not have changed your data.’ message appears when filter is verified. I’ve tried putting the tunnel-bar, even include a backslash before each period/dot. Any suggestions where te edit to make filter verifiable?

    Here’re the list of our site’s ghosts:[…]

    I’d appreciate any insights on this, thanks.

    1. mike_sullivan

      I do not comment on individual filter expressions since it is too easy to overlook a space or extra character in the wrong place – I publish a set that I know works. The filter verification feature often does not work – try your filter in a test view first.

  36. TrendyInners

    My analytics account got effected by spammers. It is very useful but i have 50 hostnames how can i find the spam hostname.

    1. mike_sullivan

      Re-read the section on valid hostnames — most people have 1 valid hostname, so the other 49 would be fake hostnames used by the spammer. Your valid hostname appears in the browser address bar when you visit your website. My website is NOT, so that is NOT a valid hostname for my analytics.

  37. Lars

    Hi Mike,

    I am a beginner in the industry so excuse me if this question seems very basic.

    In the beginning of this post you say that there is no ‘undo’ button for a filter. What do you mean by this?

    In my GA account, next to every filter it says “delete”. Did they recently change it or is there something else I’m missing here?

    1. mike_sullivan

      Once data in your view is processed for the day, there is no changing it. If you create a filter that removes too much data, and don’t fix it (or delete it) for a couple of days, all that data is lost forever — it cannot be ‘undone’ for those days. Google Analytics will not go back and reprocess the data for the past.

    1. mike_sullivan

      Language Settings is the Language field in your reports. My use of the expression \. means anything with a period in it, which covers all web addresses. The dot character is a special character in Regex, so it needs to be ‘escaped’ with a \ in front of it: \.

      1. Jason Bouwmeester

        Appreciate the quick response Mike. And I understand the use of the \. – just not sure how the Language Settings would have a web address in it, or how this only filters out the fake traffic based on Unicode characters in the URL.

      2. mike_sullivan

        Check your Audience > Geo > Language report….. “Secret.ɢ You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!” is showing up as a language for many fake referrals. If you filter on the dot, it doesn’t matter that the ‘G’ is a Unicode character.

      3. Donna Duncan

        Mike, Are we supposed to add the language settings exclusion to the new reporting segment as well? If yes, would we choose

        add filter
        language contains

      4. mike_sullivan

        No…Be careful with the Segment expression…

        With a Custom Filter, the expressions are always “Regular Expressions” or Regex. In Regex, the dot character is a special character and must be ‘escaped’ by preceding it with a backslash (\.).

        With a Custom Segment, you can choose between “contains” or “matches regex”. If using “contains” the expression is a simple dot (.), but if using “matches regex” the expression needs to be escaped (\.).

  38. raaahlouf

    hi, how can you be aware of all theses thinks and details?? How can you be informed of so many things on the subject? It’s still strange …. it’s to wonder if you are not a link in the chain!

    1. mike_sullivan

      I am surpised no one else has voiced that concern yet. I know the things I do because of the business I run — I sell products that download data direct from Google Analytics and other sources for people to build custom reports in Microsoft Excel. My customers saw the spam way back in December 2014 and I could tell that it was different from previous referral spam. With the API, you can download 7 dimensions at the same time, so it is easy for me to see Source/Medium, Hostname, City, Country, Browser, Operating System, Language all in one report, and that makes it easy to identify a unique combination of traffic that ‘spikes’ when these fake referrals appear.

      Since that time, I created my own tracking programs that scan for new sources of traffic daily. I started offering a service to my customers to manage filters for them, and now I scan hundreds of their sites on a daily basis, looking for common traffic amongst them [I build analysis tools for a living]. Because I offer a service to keep my customers spam free, I have to review the data every day and respond to any new threat. I share what I see with everyone through my articles and social media because my spam filtering service is a side business for me.

  39. Luigi Riccobono

    Very great article! Mike Thanks for your job. I will post in my blog a direct link to this page to share your precious and helpful work!

  40. corrie

    in including those hostnames, did you created another view that includes hostnames? or just created a filter under the test view? I am testing your steps now, and we have a test view for creating changes. thanks for a very insightful article!

    1. mike_sullivan

      The valid hostname filter is created in the Test view along with the other spam filters, and after confirmation, applied to your main reporting view.

  41. mike_sullivan

    The ghost spam in Google Analytics would have no impact to Google AdWords functionality, since it actually does not exist. AdWords tracks clicks by a different method that Analytics tracks sessions.


Leave a Reply to Donna Duncan Cancel reply

Your email address will not be published. Required fields are marked *