I have successfully managed to filter out hits from certain spammy sites from Google Analytics. It's an ongoing battle, as new sites are popping up all the time and polluting my acquisition/referral results.
At present, the following match is used by the GA filter to stop all the sites below showing up in the data:
.*(best\-seo\-solution|semalt|buttons\-for\-website|social\-buttons|best\-seo\-offer|Get\-Free\-Traffic\-Now|buttons\-for\-your\-website|free\-share\-buttons)\.com.*
I've added most of these myself and it works however I now need to create a pattern that allows me to input URLs that aren't a standard something.com
pattern. E.g:
site4.free-share-buttons.com
site5.free-share-buttons.com
So in these cases the end is always the same but the start can be variable.
buy-cheap-online.info
In this case it ends with .info
www.event-tracking.com
This one uses www.
whereas others do not
http://webmaster-traffic.com
This one has the http://
as well.
And on top of all of that, the filter pattern can only be 255 maximum characters (but I can have more than one filter pattern) so I need to segment it up.
How can I create a regex filter pattern that would target all above URLs?