Advertisement
Guest User

Sessions logging

a guest
Feb 20th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.29 KB | None | 0 0
  1. session_log: {
  2.     total_sessions: 123456, //total number of sessions
  3.     total_seconds: 42342, //total seconds in sessions
  4.     total_days: 100, //total elapsed days (maybe not the best approach. this is to compute daily active users/sessions)
  5.     sessions_by_month: {
  6.         '2017-02': {
  7.             groups: {
  8.                 group_id: 123 //sessions count of users in this group,
  9.                 other_group_id: 123 //sessions count of users in this group
  10.             },
  11.             sessions: {
  12.                 user_id: 123 //sessions count of this users,
  13.                 other_user_id: 123 //sessions count of this users
  14.             }
  15.         },
  16.         '2017-03': {
  17.             //...
  18.         }
  19.     },
  20.     sessions_by_day: {
  21.         '2017-02-19': {
  22.             groups: {
  23.                 group_id: 123 //sessions count of users in this group,
  24.                 other_group_id: 123 //sessions count of users in this group
  25.             },
  26.             sessions: {
  27.                 user_id: 123 //sessions count of this users,
  28.                 other_user_id: 123 //sessions count of this users
  29.             }
  30.         },
  31.         '2017-02-20': {
  32.             //...
  33.         }
  34.     },
  35.     sessions_by_hour: {
  36.         '2017-02-19-00': {
  37.             groups: {
  38.                 group_id: 123 //sessions count of users in this group,
  39.                 other_group_id: 123 //sessions count of users in this group
  40.             },
  41.             sessions: {
  42.                 user_id: 123 //sessions count of this users,
  43.                 other_user_id: 123 //sessions count of this users
  44.             }
  45.         },
  46.         '2017-02-19-01': {
  47.             //...
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement