S
S
spaceatmoon2019-08-15 11:10:01
Analytics
spaceatmoon, 2019-08-15 11:10:01

Plugins or tools to monitor traffic in Wordpress?

The site increased traffic x10 times in one day from 5 thousand views to 50,000 views, peaks at 90 thousand .. The problem is that these are all bots or even incorrectly configured redirects. After all, the same Yandex metric shows only a couple of hundred unique visitors per day. Well, they certainly won’t generate so many views on the information site.
The problem with Yandex.Metrica is that it only works if a person has JS enabled, and bots go without it. I installed the WP Statistics plugin, thanks to which a more detailed picture appeared, but working with these statistics is also difficult. Because even this plugin misses over 70% of the traffic. Now the console is already showing 27t. views, and the plugin 742.
The plugin does not know how to calculate statistics in the admin panel, if a mole appears there, then write wasted, otherwise you could see it.
The plugin also shows that popular pages on the site are a redirect to the admin panel, the main page and the privacy page, which is already hinting.
I ask for advice in the analysis of this case, in which direction to dig. Now I'm thinking of writing a script myself that collects statistics, and then manually armed with knowledge from statistics, find reptiles and ban everyone.
Speaking of bans. I have an IP from USA that visits the site the most, but what if it's just a Proxy (VPN) that the user turns on in Opere. In the same place, it seems like dynamic IP will be at the output.
UPDATE:
It turned out to be SemrushBot. Blocked via httacess.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Druzhaev, 2019-08-15
@spaceatmoon

Statistics you already have: access.log - your webserver.
Google the utilities that parse it - all sorts of grep in Linux and others. Why use WordPress for this? You are overpaying for hosting. All you need is your webserver's access logs.

A
Anatoly, 2019-08-15
@Tolly

My check goes like this (the code seems to be taken from the wp-kama plugin, I don’t remember exactly):

global $user_ID;
$who_count    = 1;	// 0 - считать всех, 1 - только гостей, 2 - только зарегистрированных пользователей
$exclude_bots = 1;	// 0 - считать всех, 1 - исключить из подсчета ботов

# Проверка пользователя: гость или зарегистрирован
$should_count = false;
switch( (int)$who_count ) {
  case 0: $should_count = true;
    break;
  case 1:
    if( (int)$user_ID == 0 )
      $should_count = true;
    break;
  case 2:
    if( (int)$user_ID > 0 )
      $should_count = true;
    break;
}

# Проверка на браузер или не бот, иначе false
if( (int)$exclude_bots == 1 && $should_count ){
  $useragent = $_SERVER['HTTP_USER_AGENT'];
  $notbot = "Mozilla|Opera"; //Chrome|Safari|Firefox|Netscape - все равны Mozilla
  $bot = "Bot/|robot|Slurp/|yahoo"; //Яндекс иногда как Mozilla представляется
  if ( !preg_match("/$notbot/i", $useragent ) || preg_match( "!$bot!i", $useragent ) )
    $should_count = false;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question