I set up a view level filter to remove ghost referral spam where the filter field ie Campaign Source and Filter Pattern is something like www.event-tracking\.com|Get-Free-Traffic-Now\.com.

Problem: However it is unable to remove www.event-tracking.com and Get-Free-Traffic-Now.com although this method removed many others.

What is special about these 2 ghost referral spam and why are they not removed?

3 Answers 3


They use a vulnerability in Google Analytics to make fake visits so the only way to stop them for now, and until Google fix it, is to make a filter in GA since that is the source of the problem.

Blocking them in the .htaccess file is pointless since this kind of Spam never visits your site.

Check this answers for more information about this spam https://stackoverflow.com/a/29312117/3197362

And this for Referrer Spam in General and some methods you can use to filter them and stop future occurrences https://stackoverflow.com/a/28354319/3197362

As for the previous/historical data, you can use segments in Google analytics. Create a REGEX with the Spam names something like this:


You can add as many as you want, but the REGEX has a 255 character limit. You can add multiple conditions if this happens

  • Go to the Reporting section in your Google Analytics.
  • In the lateral bar, expand Acquisitions > All Traffic and Select Referrals.
  • In the main board Click on +Add Segment.
  • Click on New Segment.
  • Select Conditions Below Advanced.
  • Set filter as Exclude. Change Ad Content for Medium and contains for exactly matches and type and select referral in the text box.
  • Click on AND
  • Change Ad Content for Source and contains for matches regex and paste the Spam Regex.

Try escaping all the special characters in the expression


There shouldn't be a problem filtering any referral if the expression matches it. Have you tried using a valid hostname filter instead.

One thing that all ghost spam have in common is that they use either a fake hostname or they leave it as not set, so if you create a filter with only your valid hostnames all ghost spam will be gone.

You can find more information about this solution in this related question



In Google Analytics, you can import segments builds by other advanced users. Try to import segments according to your configuration.

To get such configured segment, go to Add Segment, then Import from Gallery and apply search filter "spam bots".

You will get the lists of segments developed by the community and use them as per your configuration.

If you able to learn from custom segment, you can improve it with more data and settings and contribute back to the community

In Imported Segments, you can analyse settings, applied filters and used advanced segments to develop next version of complex segments. This is continuous learning process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.