It is easy for anyone to send spam data to your Google Analytics profile; all they need to do is get their hands on your Google Analytics account ID by simply looking at a page’s source code; Once someone has this information they can maliciously send unrelated traffic to Google Analytics using a program such as Selenium to distort your data and render it useless
I can imagine some of you may be asking why or who might do this, however in recent times we have seen negative SEO used to damage competitors websites and so it is simply a best practice precaution to implement an anti-spam filter to safe guard your Google Analytics data. As most of you will know, once data has been sent to Google Analytics it cannot be adjusted retroactively and therefore you have lost valuable insight for good.
How to Implement an Anti Spam Filter
There is a quick and simple solution that will prevent Google Analytics from registering this spam traffic; this is by simply adding a filter to the account so that only traffic from your domain(s) will be logged. Setting up this filter is easy and shouldn’t take long at all:
- Navigate to the “Admin” tab (you will need to be an admin user)
- Select the “Filters” tab
- Select “New Filter”
- Give the filter a name
- Set the parameters
- Set the domain of your website
- Add the profiles
- Save it!
Setting up anti-spam filters are as easy as that and after this simple set up is complete your Google Analytics is protected from unwanted traffic.
Don’t forget that if you ever migrate site domain you will need to change the filter.