Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Sun Nov 07, 2004 10:47 pm Reply with quote

I have been asked by a client and frequent member here for the best way to track a user's time on site. I have a couple of ideas, but I think a think-tank is in order. The main issue, of course, is that you can close the browser and there is no record that you left. You can alter cookie time, make assumptions, use sessions, timed logouts, etc. The issues are pretty well defined, but I wanted to open this up to some good discussion. The goal being to find the best way, even if it is not completely accurate, to estimate as accurately as possible, the time that a person is on a site. Let the discussions begin Smile
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Mon Nov 08, 2004 6:51 am Reply with quote

nice discussion raven....,
but its hard to come up with ideas on that cause you mentioned all of them i guess.
problem is the visitors fear of giving identity.
ok nuke works with cookies and so to me as i understand the tracking can start with login....but as you wrote,when they close the browser.....
so if the tracking continues on ip ?
That would give the problem for members with dial up or other that has different ip's all the time.
problem is also that not one system would allow communicating between a cookie and system..
so whatever it is you have to think of has to be somewhere in the database...
And because it is a weird idea....nuke gives a cookies ,but what if nuke gives a cookies every ?....minute ...?...and overwrite everytime...?
 
View user's profile Send private message
Raven
PostPosted: Mon Nov 08, 2004 9:24 am Reply with quote

We're not concerned with anonymous as much as members. But, IP tracking with anonymous would help to identify them.
 
Raven
PostPosted: Mon Nov 08, 2004 3:24 pm Reply with quote

BUMP! Come on y'all. I know there are more of you who can think 'outside of the box' Wink
 
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Mon Nov 08, 2004 3:30 pm Reply with quote

I guess without getting invasive the easiest would be to assign a value in time to each page view and multiply the 2 to get a approximate representation of how long each user has been online. I would imagine from awstats we could get a pretty fair time to use from a larger site like this. I would hazard a guess 1 or 2 minutes per page view is pretty average.

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
ecvej
Hangin' Around


Joined: Oct 10, 2004
Posts: 45
Location: Northampton, UK

PostPosted: Mon Nov 15, 2004 3:34 pm Reply with quote

Best idea off the top of my head is to use an iframe that reloads every x seconds and updates a value in the database. eg UPDATE table SET counter = (counter + 1) WHERE name = '$user_name'

If the iframe reloads itself every x secs and the counter is set to 6, you know the user has been on the site for 6x seconds. You would need the frame to operate independently of nuke meaning when you click a link in modules for example, the main frame will go to the link you click but the counter frame wont reload until after x seconds
 
View user's profile Send private message
Raven
PostPosted: Mon Nov 15, 2004 4:02 pm Reply with quote

Interesting, but that's quite a bit of MySQL overhead. But, I could use HEAP tables instead and once I detect that a user is gone, write the heap values to disk. I'll mull this over. Thanks!
 
ecvej
PostPosted: Mon Nov 15, 2004 4:16 pm Reply with quote

You're welcome. I agree it is alot of mysql, it has the advantage of being fairly accurate and I guess you'll have to weigh that against the number of users your client wants to log. Heap tables are certainly a good idea if you're going in this direction.

I only started reading this thread 30mins ago, maybe I'll come up with an even more out of the box idea later Razz
 
ecvej
PostPosted: Sat Nov 27, 2004 10:48 am Reply with quote

Have you gotten anywhere with this Raven? I wouldn't mind seeing some code for me to comment on Razz

Anyway, 2nd idea, how about you stick with the iframe but use javascript to read a value from a cookie and set a new increased value in the cookie every X seconds. Advantage = less sql. Diasadvantage = user may delete cookie.

Compromise = every now and again the cookie data is written to the database.
Only registered users can see links on this board! Get registered or login!
 
Mesum
Useless


Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Sat Nov 27, 2004 4:14 pm Reply with quote

I remember seeing an application made by the author of AdminSecure to record all the moves and times of a user into a database, it's in beta, last time I checked.
[EDIT] Forgot to say that it uses sessions to do that.[/EDIT]

Also There is one add-on called IP-Tracking that does the same minus the time on one page but if you have a busy site, your database will become huge.
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©