Use valid hostname to block google analytics referral spam


1. Go to the reporting tab
2. On the side bar click on Audience
3. Expand technology
4. Select Network
5. Scroll down to the top of the results and sort by hostname

    1. Scroll down the host names and pick out all of your hostnames/domain names you use. Next you want to add them together separated by a line for example: | |
      This line is called REGEX (Regular Expression).
    1. Go to the admin tab
    2. Select the view from the drop down you want to filter
    3. Click on filters
Select new filter
    1. Enter a filter name like valid host names
    2. Select the custom filter button
    3. Check included *important
    4. Add the filter field as hostname
    5. For filter pattern paste your REGEX from earlier with your hostnames
    6. Verify the filter
    1. You should see the fake ghost referrals on the left and the right should be blank

Your Google Analytics should now be Ghost referral free, just the crawlers left to remove. This filter will work removing all of your ghost referrals in Google Analytics from now on, but it will not remove the history of them.