ericnet
Programmer
- Mar 29, 2006
- 106
I want to collect user information and activity for each visit in my website. To do so I was thinking in use one cookie to identify user (or machine), this cookie would be ‘permanent’ in user’s machine, and use another cookie to identify every session that will be eliminated when user closes the browser or similar.
My site has also a private area where users can access previous registration and log in (this private area uses Session() object), but the rest of the site no log in is needed. Then, if user logs in during the visit, I would also store his/her user id in the user’s session information in the DB.
So in the database I would store:
-Sessions Table-
Session_id (cookie with session number)
User_num (if user logs in) Is the user id in the DB for registered users
Machine_cookie (permanent cookie that identifies the machine)
User_type (Registered or Anonymous) Registered when user logs in during the session, and Anonymous if user doesn’ t log in
IP_address
User_Agent
Is_Carwler (‘True’ or ‘False’)
Browser_name (i.e. IE)
Browser_version (i.e. 6.0)
Javascript_enabled (‘True’ or ‘False’)
Cookies_enabled (‘True’ or ‘False’)
UrlReferrer
Is this a good way to track user activity using cookies in combination with ASP.NET
Session() object?
More ideas, suggestions?
Thank you
My site has also a private area where users can access previous registration and log in (this private area uses Session() object), but the rest of the site no log in is needed. Then, if user logs in during the visit, I would also store his/her user id in the user’s session information in the DB.
So in the database I would store:
-Sessions Table-
Session_id (cookie with session number)
User_num (if user logs in) Is the user id in the DB for registered users
Machine_cookie (permanent cookie that identifies the machine)
User_type (Registered or Anonymous) Registered when user logs in during the session, and Anonymous if user doesn’ t log in
IP_address
User_Agent
Is_Carwler (‘True’ or ‘False’)
Browser_name (i.e. IE)
Browser_version (i.e. 6.0)
Javascript_enabled (‘True’ or ‘False’)
Cookies_enabled (‘True’ or ‘False’)
UrlReferrer
Is this a good way to track user activity using cookies in combination with ASP.NET
Session() object?
More ideas, suggestions?
Thank you