Use valid hostname to block google analytics referral spam

from:https://jonnyjordan.com/blog/how-to-stop-referral-spam-in-google-analytics/

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

valid 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:
      jonnyjordan.com | www.jonnyjordan.com | blog.jonnyjordan.com
      This line is called REGEX (Regular Expression).

host name

    1. Go to the admin tab
    2. Select the view from the drop down you want to filter
    3. Click on filters

valid hostname filter

    1. 
Select new filter

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

valid hostname filter settings

    1. You should see the fake ghost referrals on the left and the right should be blank
    2. 
Save

verify-filter

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.

Related posts:

Leave a Reply

Your email address will not be published.