5

Over the last few weeks I have seen a lot of 00:00:00 sessions come from spamming servers. I want a way to not only block them in Analytics but also in cPanel if possible.

If anyone knows the best way to remove all spamming hostnames please share.

halfer
  • 19,824
  • 17
  • 99
  • 186
RussellHarrower
  • 6,470
  • 21
  • 102
  • 204
  • You can block ip's on the filter tab in analytics, not sure for cpanel though. – Sven van den Boogaart Aug 13 '15 at 03:38
  • Use CSF firewall and activate after install blocklist (on csf.conf and cat csf.blocklists) Whit this you stop to many attacks. After 24 hours, you must re-read logs, and xtract IP with cat, grep, awk, and sort for analisys information. It's possible you can use some IP for block manually, or possible use a regex on regex.custom.pm (csf firewall) for add any rule to stop this attack. Please put a line of log for example attack. – abkrim Aug 13 '15 at 09:30
  • Sigh... I wish Google will do something about these issues... They should make a simple tool to purge them – fedmich Aug 20 '15 at 00:23

2 Answers2

3

Blocking Spam Traffic From within Google Analytics

You can use a combination of 2 filters to stop all the spam in google analytics:

  • A Valid Hostname Filter that will take care of all ghost spam in any form (referral, organic or fake direct visit)
  • A Campaign Source Filter with an expression built with all the known Crawlers Spam.

As an extra you can enable the built-in feature “Exclude all hits from known bots and spiders“, this option will exclude all the traffic from bots/crawlers that are not spam but they aren’t human visits either.

You can read more here http://www.ohow.co/what-is-referrer-spam-how-stop-it-guide/

Blocking Spam Traffic From cPanel

You can use IP Deny Manager within cPanel to block spam referrals.

You can read more here http://geekflare.com/block-spam-referral-traffic-to-your-website-through-cpanel/

Faheem Sohail
  • 806
  • 8
  • 21
0

This my sound a bit too easy but you could just delay the call of

    ga('send', 'pageview')  //May look different due to different Goggle Analytics Code

for like 50ms-1s. This will only record those users who stay at least 50ms-1s. I don't know what will be the best time setting but this seems to be the easy way to do it.