Issue with the content statistics plugin

MBG
MBG
Offline
0
Hi,

We've noticed an issue with the content statistics plugin.
We have added in the contentstats plugin the preference to not include our users in the statistics
The thing is that we are being included for logins (not logouts)
We've discovered that the issue could come from these lines:
$ip = $_SERVER['REMOTE_ADDR'] ;
$user = JFactory::getUser();

$blockusers = $pluginParams->get('blockusers');
$blockusers = explode(",", $blockusers);

if($user->id) $user_block = in_array($user->id, $blockusers) ;
else $user_block = false ;

the $user->id is always 0 (the user is not logged in yet, it seems) so the $user_block is always false

Is there something we haven't configured correctly, could you please give us a hint?

Thanks
Responses (2)
  • Accepted Answer

    Wednesday, April 08 2015, 10:52 AM - #Permalink
    0
    but.. you can also disable the unregistered users to be tracked by CS. is that what you want? this is another option of the main plugin.
    The reply is currently minimized Show
  • Accepted Answer

    MBG
    MBG
    Offline
    Wednesday, April 08 2015, 11:00 AM - #Permalink
    0
    not exactly...
    what I want is to keep the logins from admins and editors to count as real visits to our site, so I write their IDs in the 'Do not store these User ID visits' and their logins are added to the statistics
    • Germinal Camps
      more than a month ago
      I believe this shouldn't be happening. if you want, please send me access at support@ joomlathat.com so I can take a look.
    The reply is currently minimized Show
Your Reply