I have visitors as Guest and registered users which can be logged in or
logged out (as Guest status).
When I track sessions, I have session tracking in my db:
$query2 = "INSERT INTO users_session
SET
`SESSID` = '{$SESSID}',
`SESSusername` = '{$user}',
`SESSIP` = '{$_SERVER['REMOTE_ADDR']}',
`SESStype` = 'logged',
`TimeOut` = UNIX_TIMESTAMP()" ;
$_SESSION['logged'] = TRUE;
$_SESSION['SESSID']= $SESSID;
$_SESSION['SESSusername'] = $user;
$_SESSION['SESSIP']= $_SERVER['REMOTE_ADDR'];
$_SESSION['SESStype']= 'logged';
$_SESSION['TimeOut']= 'UNIX_TIMESTAMP()+{$SESSTimeOut}';
Questions:
1. How to do variable $SESSTimeOut
timeOut should be calculated when user
leave my site by changing the url or closing the browser
Is normal to track users in db also if they have status as GUEST? Db can be large...
How to manage easy if user can have permission only on particular pages?
I have session on each page.
I would like to track users activity. What are advanced indicators which should track visitors activity and how to do:
track user page flow?
high trafic pages?
places people tend to come in?