The last few days our customers experienced some referral traffic spam in Google Analytics from a website called goodname1.xyz. They asked us: 'How to block goodname1.xyz in Google Analytics?'
How to block Google Analytics spam from goodname1.xyz?
To block goodname1.xyz as a referral you have to follow the goodname1.xyz next steps:
- 1. Open in Google Analytics the "Admin" section, go to "View" (the right column) and select "Filters".
- 2. Click on the "+ ADD FILTER" button to exclude the results.
- 3. Enter a filter name that you can remember, something like "block goodname1.xyz".
- 4. By the "Filter Type" you have to select the "Custom" option.
- 5. Select the "Exclude" radio option. Then the "Filter Field" will popup where you can select "Campaign Source". As the "Filter Pattern" you have to enter the domain, the will look like "goodname1.xyz".
- 5.1. It's also possible to filter multiple domains at the same time, this can be done by adding a "|" between the domains. Then the "Filter Pattern" will look something like this: "goodname1.xyz|my-other-spam-domain.com|my-second-spam-domain.com".
- 6. To save this filter, scroll down and click the "Save" button.
The filter will be applied on all data that's captured by Google Analytics. To verify that your filter is working you can click the "Verify this filter" link when you create or edit the filter.
Allow only a valid hostname as a filter in Google Analytics
It's also possible to only "include" a specific hostname to your Google Analytics data. This can be done by creating a filter that uses a regex to check if the domain is valid.
Google Search trends: Google Analytics Spam vs. goodname1.xyz
Here you can see what the current Google Search Trend is for the past 7 days for the search terms: "Google Analytics Spam" and "goodname1.xyz". We use the worldwide search data from Google Trends for displaying this chart.