Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

More accurate 'Users Online' stats
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 04-10-2008, 11:20 PM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default More accurate 'Users Online' stats

I see that many users claim that 'Users Online' stats is quite innacurate.
Actually it isn't a bug, but a feature : -)
'Users Online' shows all the customers who open any page during the last 30 minutes.
Known bots are not counted. (The list of the known bots can be found in the include/bots.php file)


How to make this module accurate:

1. Open modules/Users_online/registered_user.php script.

2. Replace

PHP Code:
$expiry_time $curtime $config["Sessions"]["session_length"]; 


with

PHP Code:
$expiry_time $curtime 300// 5 minutes instead of 30 minutes 
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote

The following 2 users thank Ene for this useful post:
joshf (01-27-2010), JWait (02-28-2009)
  #2  
Old 04-11-2008, 02:07 AM
  pauldodman's Avatar 
pauldodman pauldodman is online now
 

X-Man
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 2,954
 

Default Re: More accurate 'Users Online' stats

Of course you could use this to make it less accurate so that a quiet shop appears really busy to help achieve that "safety in numbers" feeling and make them spend money.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Need help with the latest security patch - click here

Google reCaptcha module for X-Cart now available - Click here

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 04-11-2008, 02:48 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: More accurate 'Users Online' stats

Eugene,

Thank you for this --

Do you have any idea why my "users online" stats will also show multiple entries from the SAME IP at times? As many as 5-20 duplicate entries, from the same IP, will be listed -- not always, so it is difficult to chase down why??? It is quite annoying to see the same IP as 10 entries, all on different pages... and if they have items in their cart, it will look like each entry has the same items --

Could this issue be related to Marketing Manager Pro, or WebsiteCM's "remember me" ?

Thanks,

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 04-11-2008, 02:57 AM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: More accurate 'Users Online' stats

Quote:
Originally Posted by carpeperdiem
Eugene,
Do you have any idea why my "users online" stats will also show multiple entries from the SAME IP at times? As many as 5-20 duplicate entries, from the same IP, will be listed -- not always, so it is difficult to chase down why??? It is quite annoying to see the same IP as 10 entries, all on different pages... and if they have items in their cart, it will look like each entry has the same items --

Somebody browses your site and doesn't accept cookies.
Most likely it's an unknown bot or a spider.

Could you possibly PM me this IP?
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #5  
Old 04-11-2008, 03:10 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: More accurate 'Users Online' stats

It's not just one IP -- I see this constantly. Next time I see this, I'll PM you. Thanks
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 04-12-2008, 07:37 AM
 
homeworldz homeworldz is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 68
 

Default Re: More accurate 'Users Online' stats

What does the '300' value represent ?
__________________
x-cart 4.1.9
Reply With Quote
  #7  
Old 04-12-2008, 07:39 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: More accurate 'Users Online' stats

Quote:
Originally Posted by homeworldz
What does the '300' value represent ?

seconds -- note the comment "// 5 minutes instead of 30 minutes"
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #8  
Old 04-12-2008, 07:40 AM
 
homeworldz homeworldz is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 68
 

Default Re: More accurate 'Users Online' stats

The penny just dropped that 300 seconds is 5 minutes
__________________
x-cart 4.1.9
Reply With Quote
  #9  
Old 04-15-2008, 07:28 AM
 
hamid hamid is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 107
 

Default Re: More accurate 'Users Online' stats

carpeperdiem - you get multiple instances of an ip if the visitor opens a new window or tab (for example middle clicking a link in firefox) - each window/tab starts a new session
__________________
X-Cart Gold v4.6.5
Reply With Quote
  #10  
Old 04-15-2008, 08:10 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: More accurate 'Users Online' stats

Quote:
Originally Posted by hamid
carpeperdiem - you get multiple instances of an ip if the visitor opens a new window or tab (for example middle clicking a link in firefox) - each window/tab starts a new session

ah... good explanation. thanks.

I paid usertesting.com to do a usability test -- and the tester kept right-clicking away. Not only was it annoying to watch her do this, but she didn't get the benefit of the navigation system in place... I tweaked my navigation after watching her do this.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:09 AM.

   

 
X-Cart forums © 2001-2018