Unfortunately, there’s no way to get information OUT of Google Analytics once it’s in there. However, there are ways to keep this kind of spam out in the future, and to remove it from the reports on existing data.
How to block referral spam in Google Analytics
As the name suggests, we usually see this kind of spam in the referral-section of Google Analytics. If Analytics isn’t properly set up (that’s by far in most of the cases), you can see suspicious referrals (under Acquisition > Referrals), such as:
In the case of the Vote for Trump referral spam, the information is located in the language-tag (under Audience > Geo > Language).
To effectively block referral spam, do the following in Google Analytics:
- Go to ADMIN > All Filters
- Click on “ADD FILTER”
- Give the filter a name (e.g. “include host only”)
- Click on Filter Type “Custom”
- Click “Include”
- Click “Select Field” and select “Hostname”
- Under “Filter Pattern”, add the domain name of your website (e.g. “searchify.ca”)
- Apply the filter to any of your profiles.
This will ensure that only Analytics requests from your own domain will be counted in Google Analytics. Automated , external requests from other domains will not be included in the data.
How to remove referral spam from Analytics reports
In order to remove referral spam from reports, add a similar filter to the reports. In the case of the Donald Trump referral spam, do the following to filter the referrer spam out of any Analytics report or Data View:
- Create a new Report or Segment
- Click on “Traffic Sources”
- Under “Source”, type the domain of the spammer you’d like to exclude (e.g. “webmonetizer.net”
- If you have multiple spammers, choose “matches RegEx” and add a list of spammer domains, separated by a pipe sign and with a backslash before the dot (e.g. “webmonetizer\.net|wmasterlead\.com”. Feel free to omit the top domain levels (e.g. “.com” or “.ru”) altogether.
- Save your report or segment.