Semalt: Getting Rid Of Ghost Referrals In Google Analytics
Ghost referrals are real, and one may have encountered them without even realizing it. They may seem like good and profitable traffic, but the reality is that there is no traffic at all. Worse yet is that the traffic distorts the Google Analytics reports. There is no concrete list of all spammy domains as they keep evolving. As they continue to grow, they change their tactics, structure, and technology used. It is the reason why there is no reliable solution to the menace.
The following guide provided by Michael Brown, the Customer Success Manager of Semalt, should eliminate a majority of these threats.
Removing Spam Referrals from Google Analytics
There are different ways through which user can accomplish the task:
- Using Google Tag Manager
- Google Analytics filters
- Browser cookies
#1 Back Everything Up
Data contained in a system is critical. If one is to deal with anything that has the potential to change its structure such as malware, Trojans, or viruses. It is therefore important to back it up first before anything else. There are many ways to back up Analytics to ensure that the owner preserves all raw data.
#2 Using the Wrong Hostname Filter
Open Google Analytics, then navigate to the Audience, and then select Network. Upon opening, select Hostname to display all hostnames made available to the users wishing to visit the site. It is not possible to run the Analytics script on another domain other than yours. If the ghost referrer is visible, click on Admin, the right column should present a select option for the right kind of view one wishes to apply. Next, choose filters and opt for a new filter. Select custom filter type and choose include. Next, file the regex that matches the identified hostname with or without the www.
#3 Filtering Bad Referral Traffic
The first thing to do is to filter traffic which happens away from the website's domain. However, if a spambot makes its way to the site, first create a new filter by navigating to filters, create a new custom filter. Select "referral" in the filter field, and "long regex" in the filter pattern. Second, Analytics offers a feature where users can filter out spiders and bots. Select "Admin", click on "view", and under "view settings", check the option titled "Botnet Filtering".
#4 Placing a Cookie to Filter Spam Referrals
The solutions raised so far are not long-lasting due to the increasing number of spam bots daily. Here is one principle that should work for the site:
- Spam bots do not have browsers.
- Place a cookie on the visitor's browser.
- Read the cookie into Google Tag Manager and include it in analytics.
- Google Analytics will only consider visitors with the cookie.
The site owner can set up cookies on the visitor's browser using two ways. The first is to fire tag in Tag manager or to manually add the cookie using the code snippet "after </body> tag" at the foot of the browser. Google Analytics may not find the Tag Manager' cookie which is why the latter is the best.
On the "Admin" tab, select "custom definitions and dimensions." Create the cookie dev-status. Now, read the value of the cookie by going to variables, and clicking on new. When done with this, head to GTM, and under the custom setting dimensions, insert the new index and variable dev-status just created. The final step is to ensure that Google Analytics only recognizes traffic with a cookie. Create a new filter with the parameters encompassing the cookie definitions.