aimythomas — 2012-10-05T02:02:50-04:00 — #1
Need a perfect user data base solution for my ecommerce website. I want to track whole activity of my end user until the user logout
Thanks in Advance
logic_earth — 2012-10-05T02:20:41-04:00 — #2
Alright...and what is the question or problem you are having? Or are you wanting to use us as free labor once more? I would think judging by the link in your signature, that you would have the ability to develop such a system. :s
cpradio — 2012-10-05T05:51:03-04:00 — #3
This is very similar to providing a Who's Online component to a website, which consists of the following:
First you have to have a MySQL table, lets call it Sessions (or whatever you want to call it; with at least a session_id column and a last_activity_date column, you can add additional columns)
Next you INSERT a record into this table storing the session id of the user session_id() and a date/time stamp (using MySQL function NOW()).
As the browse your site you update that record's last_activity_date column.
At the same time, you have either a cronjob running or a second query run on every page that queries the Sessions table checking for a date/time stamp that is more than X minutes ago.
Example: session_id 123456 last_activity_date reports 2012-10-04 11:00:00 and it is now 2012-10-04 11:15:00, so 15 minutes have passed with no interaction.
Now do whatever you wanted to do with those records.