Block Spam Bot Traffic in Google Analytics

Google Analytics provides website traffic and conversion related data so website owner can analyze website growth and profit and optimize accordingly. Google analytics spams are a big problem in analyzing the website. Every Google Analytics owners are facing spam bot traffic in their account which can damage data accuracy and it becomes hard to take right marketing decisions and you can loss profit and sale. So make all spam traffic blocked to get accurate data so you can take right marketing decision and improve website conversions and conversion rate.

Ghost and Referral Spam Difference

There are two types of spam in Google Analytics – (1) Ghost Spam and (2) Referral Spam

Ghost Spam – If you get directly hit your website and GA code load. Generally created by software and hacking technique. You can see them everywhere like in events, hostname, direct traffic, (not set), referral.

Referral Spam – If you get directly hit your GA code not website. Generally spammers generate fake traffic to get their product or website promotion.

Block Referral Spam in Google Analytics

Every website have their own definition on both topic. don’t go in deep, just think these are fake traffic. Let’s see how to check you are getting spam traffic and how to block them.

First Block Regular Known Spam Bots By Google Analytics Itself

  • Step #1. Login your google analytics account then click on admin in left side corner

  • Step #2. then click on view setting

 

  • Step #3. then check this option – “Exclude all hits from known bots and spiders”
    Admin > View Setting > Check “Exclude all hits from known bots and spiders”

How to check referral spam traffic in Google Analytics

If you are getting fake traffic from other external website that is referral spam. Let’s see how find referral spam bot sites in google analytics, so you can block them permanently.

  • Step #1. Login your Google Analytics Account
  • Step #2. Click on acquisition from left side menu
    see image
  • Step #3. then click on All Traffic from left side bar (Acquisition > All Traffic)
    acquisition all traffic google analytics report
  • Step #4. then click on channels from left sidebar (Acquisition > All Traffic > Channels)
    google analytics channels
  • Step #5. then click on referral from the table of default channel grouping
    google analytics default channel grouping
  • Step #6. Here you can see your all referral spam traffic
    You have to verify which are spam and which are your actual referral traffic.

    One more example –

there is a simple way to verify referral spam site.

Just search on Google this query – “google analytics spam [referral site url]

see example

referral spam search on google

this is the fastest way to verify spam referral site in Google Analytics

These are ads type websites, easily you can understand.

Note: Make sure these are not your own paid or ppc traffic sites. Sometime bing and other affiliate paid traffic comes in the referral traffic.

How to Block Spam Referral Traffic in Google Analytics using Filter

We can block these referral spam bots by using Google Analytics filters. Let’s see how…

  • Step #1. Click on Admin from left side corner
  • Step #2. then click on filters from view section
    filter in google analytics
  • Step #3. then click on add filter button, if you are not able to click on this button that means you don’t have the edit access. You need to take this from admin account holder.
  • Step #4. Type filter name, you can type any name.
  • Step #5. Choose filter type Custom – Exclude
  • Step #6. Then choose filter field Referral from drop down

    and put your referral sites in filter pattern – bestofferhddacy/.info|getbytadsincome/.info
    We use here regular expression where pipe (|) is a separator for multiple sites (without space) and we use forward slash (/) before dot (.) to tell that dot is not a regular expression here.
    This is the way you can block multiple referral sites.
    But It has some limit, you can only add 250 characters in filter pattern.
  • Step #7. and then verify this filter.
    verify filter google analytics
    If you have some data of these referral sites in last 7 days then you can see some data in table form when you will verify the filter.

    Now save this filter and you will not get any referral spam from these sites in future in your Google Analytics.

How to Block your referral spam by htaccess file

## STOP REFERRER SPAM
RewriteCond %{HTTP_REFERER} bestofferhddacy/.info [NC,OR]
RewriteCond %{HTTP_REFERER} getbytadsincome/.info [NC,OR]
RewriteRule .* – [F]

Block Hostname Spam in Google Analytics

Second most spam comes from fake hostnames. If you are getting traffic from other hostname (not from your own hostname) mostly are fake.

Your main website and their subdomains are real hostnames and rest of are mostly spam bots.

So it is very easy to know which are your hostname and which are fake.

see examples of your actual hostname

yourwebsite.com

subdomain-1.yourwebsite.com

subdomain-2.yourwebsite.com

and so on…

How to find hostname in Google Analytics

  • Step #1. Sign in your Google Analytics account
  • Step #2. Click on Audience from left side menu
  • Step #3. then Click on Technology
    technology google analytics
  • Step #4. then Click on Network
  • Step #5. Click on Hostname from the top of the table
  • Step #6. Here you can see all hostname report

google analytics hostname not set

(not set) in hostname google analytics report is also fake traffic. So it should be removed from your account.

if user click on cached button on the Google SERP then URL will be opened via webcache.googleusercontent.com

and if user open your website through google translator then URL will be opened via translate.googleusercontent.com

in the above hostname report both are genuine websites and generating genuine traffic.

portcodelist.com is a main website and rest of are fake and spam bot traffic.

How to check Hostname spam by Segment

You can not delete historical spam hostname data but you can see it by segment.

Condition: Exclude > Hostname > matches regex > valid hostnames

 

How to block hostname spam in Google Analytics using Filter

  • Step #1. Login with your account
  • Step #2. Click on Admin Setting section
  • Step #3. Click on Filter from view setting area
  • Step #4. Click on Add filter red button
  • Step #5. Type Filter Name – Any name (Block Hostname Filter)
  • Step #6. Filter Type – Custom > Include
  • Step #7. Filter Field from Drop down – Hostname
  • Step #8. Add here filter pattern – valid hostname in regular expression form.
  • Step #9. Verify filter and see last 7 days data on the spot.
  • Step #10. Save the filter.

Filter Pattern:

.*portcodelist/.com/.com|translate/.googleusercontent/.com|webcache/.googleusercontent/.com

if you have sub-domain in your website then use (.*) before hostname.

Hostname filter can also block 99% spam bot traffic.

This filter also remove fake events and goal conversion traffic.

This filter can remove complicated spam like ghost spam.

Block Internal IP in Google Analytics

If you are running a company then your designers, developers, testers, marketers and other employees will open your website and they are counted in the google analytics. This is your own traffic and there is no reason to mix it with your real data. We should block internal traffic and make data accurate.

How to check internal IP traffic in Google Analytics

Yes, there is a way to know internal traffic (own company traffic) in google analytics only if you have your own company service provider.

Click on Audience from left side menu and then click on Network (Audience > Network)

service provider IP check

Here you can find your company’s service provider and see how many visits are you getting and how much data being damaged.

Learn more about service provider google analytics report

How to Block Personal IP in Google Analytics Using Filter

If you want to block your own visits or want to exclude your own IP then follow these steps…

Follow the given steps and create a filter to block language fake traffic.

  1. Create New Filter
  2. Filter Name – Type any name (Block Internal Traffic)
  3. Filter Type – Custom
  4. Filter Field  – Exclude > IP Address
  5. if you want to block single IP
    Filter pattern – 182/.69/.202/.219$If you are using multiple IPs
    Filter Pattern – 182/.69/.202/.219$|188/.66/.788/.677$
    Use pipe for multiple IPsIf you want to block sub-set of IPs
    182.69.202.219
    182.69.202.220
    182.69.202.221
    182.69.202.222
    Filter Pattern – 182/.69/.202/.*$If you want to block dynamic IP
    If your IP is changing frequently then you can’t stop it by google analytics filter but you can use a chrome extension which can block your own visits. Just install this extension in your chrome browser – Block Yourself from Google Analyticsand then save your filter.

You can also block IPv6 address which look like 2720:0:10e2:2:c4bc:9fd2:984f:cf17

For more details, see google analytics internal IP block Support Article

You can also use predefined Filter but it does not support regular expression.

How to check your IP Address

If you don’t know that how to know personal Internet IP address. This is very simple just search on Google “What is my IP”

 

Block Language Spam In Google Analytics

Spam can destroy your marketing strategy and budget. This is necessary to stop that spam. Generally Google analytics holders mostly get referral and hostname spam but in some cases they get language spam bots and fake traffic. If you are getting bot traffic from spam language then you have to remove them using language filter. Mostly people got this during Trump Voting.

How to check Language Spam in Google Analytics

  • Step #1. Login your GA account
  • Step #2. Click on left side menu – Audience > Geo > Language
  • Step #3. Here you can language Report

language spam in GA

How to check language spam data by Segment

Create New Segment and add this Condition

Language > Matches regex > \s[^\s]*\s|.{15,}|\.|,

spam language segment

How to Block Language Spam Traffic in Google Analytics Using Filter

  • Step #1. Click on setting icon (Admin) from bottom side left hand corner
  • Step #2. then click on filters from right side view section
    filter in google analytics
  • Step #3. Here you can create new filter then click on add filter button, if you are not able to click on this button that means you don’t have the edit access. You need to take this from admin account holder.
  1. Create New Filter
  2. Filter Name – Type any name (Block Spam Language)
  3. Filter Type – Custom
  4. Filter Field  – Exclude > Language Setting
  5. Filter pattern – \s[^\s]*\s|.{15,}|\.|,
  6. Filter Save

This filter pattern will block all type fake language traffic.

language spam bot block

You can verify this filter and see last 7 days language spam data if you have.

Block Spam City, Region, Country in Google Analytics

You can also block specific city/region/country in Google Analytics. Sometime it happen you may get traffic from a specific location and you can easily block them by custom filter on city or region or country. Lets see an example…

Google Analytics Referral Spam Sites List

  1. auto-seo-service.org
  2. autoseo-service.org
  3. auto-seo-service.com
  4. autoseoservice.org
  5. resell-seo-services.com
  6. uptime-us.net
  7. uptime-eu.net
  8. uptime-as.net
  9. best-deal-hdd.pro←──━━──══─━═━━━━━━─═━━━─visit-uṣ
  10. get-more-freeen-visitors.info
  11. semalt.com
  12. buttons-for-website.com
  13. darodar.com