I'm sure an application like this has already been written, but here are
some considerations if you'd like to build your own:

-You need to start a session or have some other functionality that
identifies each user uniquely as they browse your pages.

-For EVERY page the user visits, you're going to need to record that
information in a database (page, userID, time, etc)

-You can't really record when they leave - but more accurately when they
browse another page. This will give you the approx. end time to the previous
page view and also allow you to "track" their flow through the site.

-When you create your reporting interface, just have it ignore gaps of a
certain length of time between page views. If someone has a gap of 10 hours,
then they've probably gone to bed or left work and come back to it the next
day. It doesn't make sense to count the page view as being "10 hours long".

So yes, it's possible with PHP. Is it worthwhile? Eh, maybe. But just
realize the overhead that you'll be putting on a busy site with a DB entry
for EVERY page view - even for pages with no dynamic content (not to mention
any pages that might require real DB querying).


-----Original Message-----
From: Tim Winters [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 8:06 AM
To: 'PHP-DB'
Subject: [PHP-DB] Page Use


I'm interested in setting up a system whereby I can track a users
movements through a site.

I particularly I am interested in recording both that the user actually
hit the page but also the time he spent on that page.

Is this possible using PHP and if so how?


Tim Winters
Creative Development Manager
Sampling Technologies Incorporated

1600 Bedford Highway, Suite 212
Bedford, Nova Scotia
B4A 1E8
Office: 902 450 5500
Cell: 902 430 8498
Fax:: 902 484 7115

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to