Haven’t you experienced that you got so excited about a sudden surge in traffic in your Google Analytics, then, less than 2 minutes, got so depressed finding out many (if not most) traffics are from stupid sharebutton.to?
If so, the good news is that at least you know that sharebutton.to is an evil fake data spammer.
Carlos Escalera of ohow.co wrote a very detailed awesome blog post on this issue.
I’ll create a series of posts based on his article in order to make how-to look a little simpler.
Nutshell
Let’s make Google Analytics count traffic only to legit hosts by creating “Valid Hostname” filter.
Step by Step
1. Obviously, go to your Google Analytics page.
2. Go to “Audience” under “Reporting” tab.
3. Expand “Technology” and choose “Network.”
4. Select “Hostname” at the top of the report.
Google Analytics Reporting Page
5. From the list of hostnames, make a list of valid hostnames. This is how Carlos defines “Invalid Hostnames”:
“An invalid hostname is essentially any other that you do not know and controls. For example:
– Hostnames with URLs pointing to the spammer website.
– Known sites like google.com or amazon.com (spammers use them to mislead people)
– The most common hostname for spam (not set), this happens when the spammer doesn’t even bother to set a fake hostname.”
* Note that google.com, amazon.com and other well-known sites are NOT valid hostnames.
6. How I filter them: I exported the list as an excel file and deleted all invalid hostnames.
Exporting the list of hostnames in an excel file
7. Once you collect all of your valid hostnames, you need to create “Regular Expression (REGEX)” which is a format of the hostnames to fit into filters in Google Analtyics. Two main points are:
(1) To separate each hostname, you should use a bar “|”.
(2) The dot “.” and the hyphen “-” are considered special characters in REGEX so you should add a backslash \ before them.
In my case, I had only 3 valid hostnames (www.culium.com, culium.squarespace.com and culium.com) and they look like this in REGEX:
www\.culium\.com|culium\.squarespace\.com|culium\.com
8. Now, let’s create a vaild hostname filter. Go to “Admin” tab, select “All Filters” and click “ADD FILTER.”
Creating a valid hostname filter 1
Creating a valid hostname filter 2
9. Under “Filter Name,” enter “Valid Hostname.”
10.Under “Filter Type,” select “Custom,” and choose “Include,” then under “Filter Field,” choose “Hostname.”
11. Under “Filter Pattern.” enter the Regular Expression you created at step 7.
Creating a valid hostname filter 3
12. Under “Apply Filter to Views,” select “All Web Site Data” under “Available Views” then click “Add >>.” Confirm “All Web Site Data” moves to “Selected Views.”
13. Click “Save.”
Creating a valid hostname filter and saving it
If you are interested in this process and need more details, please visit Carlos’ original blog post: How to Get Rid of the Spam and Other Junk Traffic in Google Analytics
Results: It has been only one day since creating the filter (11/8/2016) so I’ll update the more results later. Please, let me know if you have any questions or how it works at your end.
Leave a Reply