Activity tracking usecase for login tracking.

Posted by Mdillion on Stack Overflow See other posts from Stack Overflow or by Mdillion
Published on 2010-12-26T13:20:24Z Indexed on 2010/12/26 13:54 UTC
Read the original article Hit count: 490

Filed under:
|
|

Creating an activity tracking system for a social site. All user activiti from pooint of login til logoff are to be tracked. This means the first use case is the user's login. Every activity will have the same format so once I figure out how to track one activity then I can create chema for all activities. Currently for login I have steps like:

Two solutions I have:
Activity 1: User attempts to login
Activity 2 A: User has successfully logged in
Activity 2 B: User failed to login.
Activity 2 B A: User failed to login due to invalid password
Activity 2 B B: User failed to login due to locked account.

OR

Activty 1: User login - with result = Pass or Fail and if Fail reason = flag_id of reason.

Accordingly I have to create the schema. For now I have it like this:
activity_id
object_id (fk)
session_id (fk)
user_id (fk)
flag_id (fk)
created_dt
friend_id (fk)
result (pass/fail)

But ofcourse this a work in progress.

© Stack Overflow or respective owner

Related posts about database

Related posts about activity