Powered by Blogger.
8/recent posts

Step-by-step Guide on Removing Fake Visits from Your Google Analytics

Step-by-step Guide on Removing Fake Visits from Your Google Analytics

You see a lot of traffic in your Google Analytics report but after evaluating it, you discover that most of them are spam.

If you’re wondering if you can filter out this spam traffic to see accurate data, there are ways on how to do it and I’m going to share it with you now.

But before you do this, you should create a separate view first for the filtered version of the report. This way you can still see the unfiltered version and can compare it with the filtered version. Here’s how:

1. After you sign in to your Google Analytics account, go to the Admin tab of the Account and Property to which you will add the view.

2. In the drop down menu under the VIEW column, click Create new view.

create new view in google analytics

3. Enter a name. You can name it ‘Filtered Data’ if you like.

4. Set the Reporting Time Zone.

5.Click on Create View button.

new reporting view in google analytics

Yay, you already have the view for the filtered report! Let’s start removing the unwanted traffic from your Google Analytics.


This will exclude all hits from known bots and spiders.

1. Go to the Admin tab.

2. Click the View Settings under the VIEW column.

view settings under the view column

3. Check the box under Bot Filtering.

4. Click Save.

bot filtering in google analytics


This type of traffic is generated by spammers who send fake visits to your Google Analytics reports. By only including hits from valid hostnames, you can eliminate this unwanted traffic from your reports.

1. Identify the valid hostnames.

To make a list of your valid hostnames, follow these steps:

1.1. From Filtered Data, switch to All Web Site Data.

switching from one view to another in google analytics

1.2. Click the Reporting tab.

1.3. Go to the Network report under Technology in the Audience menu, and select Hostname as the Primary Dimension.

view list of valid and invalid hostnames in google analytics

1.4. Select a wide timeframe on the calendar. If your website is more than a year old, then one year should be fine. If not, just select everything.

Below you can see the list of valid hostnames for my website:
  • www.theoptimistblog.com (you should find at least one valid hostname which is your main domain)
  • translate.googleusercontent.com (the hostname that shows when a user views my website through Google translate)
  • webcache.googleusercontent.com (the hostname when a user views my website its cached version in Google)
  • web.archive.org (the hostname when they visit my website using Internet Archive Wayback Machine)
valid hostnames

Please take note of the following:
  • Spammers use known pages like google.com and bing.com so don’t fall for this tactic
  • (not set) is the most common hostname for spam

2. Put all the valid hostnames in a single line of text separated by vertical line.

Using the abovementioned list, the expression will look like this:


3. Go back to the Filtered Data view.

4. Click Filters under the VIEW column.

filters in google analytics

5. Click on the +ADD FILTER button.

6. Enter the Filter Name.

7. Choose Custom as the Filter Type.

8. Select Include.

9. In the Filter Field drop down menu, choose Hostname.

10. Enter the expression you have created in the field for Filter Pattern.

11. Click Verify this filter to see how the filter will work. The preview table should only display invalid hostnames on the left side.

filter verification

12. Click Save.

filtering out traffic from invalid hostnames


This type of spam traffic comes from those referral spam domains that actually visit your website. You need to create another filter to exclude them from your reports. Follow the steps below:

1. Go back to the unfiltered view (All Web Site Data).

2. Click Reporting tab.

3. Go to Channels under Acquisition menu.

4. Select Referral in the Default Channel grouping column.

referral traffic

5. Find and select Hostname in the Secondary dimension drop down menu.

find and select hostname in the secondary dimension drop down menu

6. View the last 3 months’ report.

last 3 months’ report

7. Sort Sessions from highest to lowest.

choose referral websites with the lowest average session duration

You will see that the top 10 referral sites are using a valid hostname but not all of them are sending valid traffic to my website. By looking at the Avg. Session Duration of each website, you will see which websites are sending real visits and which are not. To come up with a list of spam domains, choose only the ones with the lowest average session duration.

Here’s my list:
  • keywords-monitoring-your-success.com (4 seconds)
  • fix-website-errors.com (3 seconds)
  • keywords-monitoring-success.com (9 seconds)
  • free-video-tool.com (4 seconds)
  • highexistence.com (18 seconds)
Since my website is not receiving a lot of referral traffic, I will only look at the top 10 referral websites.

8. Create an expression using the list you have created.

Using my list, it will look like this:


9. Go back to the Filtered Data view.

10. Click the Admin tab, Filters under the VIEW column and +ADD FILTER.

11. Add Filter Name. You can use ‘Spam Domains’ if you like.

12. Choose Custom as the Filter Type.

13. Find and select Campaign Source in the Filter Field drop down menu.

14. Enter the expression in the Filter Pattern field.

15. Click Verify this filter. You should only see data on the left side of the preview table.

16. Click Save.

filtering out traffic from spam domains

If you see new spam domains showing up on the filtered version of your report in the future, all you have to do is add them to the existing expression.

That’s it. You already have a separate view that will only display accurate data.
Share This


We Are Sorry, Page Not Found

Apologies, but the page you requested could not be found.