uni-stat-session-logs.schema.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // 应用会话日志表
  2. {
  3. "bsonType": "object",
  4. "description": "记录设备访问时产生的会话日志",
  5. "required": [],
  6. "permission": {
  7. "read": false,
  8. "create": false,
  9. "update": false,
  10. "delete": false
  11. },
  12. "properties": {
  13. "_id": {
  14. "description": "ID,系统自动生成"
  15. },
  16. "appid": {
  17. "bsonType": "string",
  18. "description": "客户端上报的应用ID"
  19. },
  20. "version": {
  21. "bsonType": "string",
  22. "description": "客户端上报的应用版本号"
  23. },
  24. "platform": {
  25. "bsonType": "string",
  26. "description": "客户端上报的平台code"
  27. },
  28. "channel": {
  29. "bsonType": "string",
  30. "description": "客户端上报的渠道code\/场景值"
  31. },
  32. "type": {
  33. "bsonType": "string",
  34. "description": "会话类型",
  35. "defaultValue": 1,
  36. "enum": [{
  37. "text": "正常进入上报",
  38. "value": 1
  39. }, {
  40. "text": "后台进前台超时上报",
  41. "value": 2
  42. }, {
  43. "text": "页面停留超时上报",
  44. "value": 3
  45. }]
  46. },
  47. "device_id": {
  48. "bsonType": "string",
  49. "description": "客户端携带的设备标识"
  50. },
  51. "last_visit_user_id": {
  52. "bsonType": "string",
  53. "description": "本次会话最终访问用户的ID, uni-id-users._id,客户端上报"
  54. },
  55. "is_first_visit": {
  56. "bsonType": "int",
  57. "description": "是否为首次访问",
  58. "defaultValue": 0,
  59. "enum": [{
  60. "text": "否",
  61. "value": 0
  62. }, {
  63. "text": "是",
  64. "value": 1
  65. }]
  66. },
  67. "first_visit_time": {
  68. "bsonType": "timestamp",
  69. "description": "用户首次访问时间"
  70. },
  71. "last_visit_time": {
  72. "bsonType": "timestamp",
  73. "description": "用户最后一次访问时间"
  74. },
  75. "total_visit_count": {
  76. "bsonType": "int",
  77. "description": "用户累计访问次数,客户端上报"
  78. },
  79. "entry_page_id": {
  80. "bsonType": "string",
  81. "description": "本次会话入口页面ID, 同uni-stat-pagesd"
  82. },
  83. "exit_page_id": {
  84. "bsonType": "string",
  85. "description": "本次会话退出页面ID, 同uni-stat-pagesd"
  86. },
  87. "page_count": {
  88. "bsonType": "int",
  89. "description": "本次会话浏览的页面数"
  90. },
  91. "event_count": {
  92. "bsonType": "int",
  93. "description": "本次会话产生的事件数"
  94. },
  95. "duration": {
  96. "bsonType": "int",
  97. "description": "本次会话时长,单位为秒,服务端计算"
  98. },
  99. "sdk_version": {
  100. "bsonType": "string",
  101. "description": "基础库版本号"
  102. },
  103. "platform_version": {
  104. "bsonType": "string",
  105. "description": "平台版本,如微信、支付宝宿主App版本号"
  106. },
  107. "device_os": {
  108. "bsonType": "int",
  109. "description": "设备系统编号,1:安卓,2:iOS,3:PC"
  110. },
  111. "device_os_version": {
  112. "bsonType": "string",
  113. "description": "设备系统版本"
  114. },
  115. "device_net": {
  116. "bsonType": "string",
  117. "description": "设备网络型号wifi\/3G\/4G\/"
  118. },
  119. "device_vendor": {
  120. "bsonType": "string",
  121. "description": "设备供应商 "
  122. },
  123. "device_model": {
  124. "bsonType": "string",
  125. "description": "设备型号"
  126. },
  127. "device_language": {
  128. "bsonType": "string",
  129. "description": "设备语言包"
  130. },
  131. "device_pixel_ratio": {
  132. "bsonType": "string",
  133. "description": "设备像素比 "
  134. },
  135. "device_window_width": {
  136. "bsonType": "string",
  137. "description": "设备窗口宽度 "
  138. },
  139. "device_window_height": {
  140. "bsonType": "string",
  141. "description": "设备窗口高度"
  142. },
  143. "device_screen_width": {
  144. "bsonType": "string",
  145. "description": "设备屏幕宽度"
  146. },
  147. "device_screen_height": {
  148. "bsonType": "string",
  149. "description": "设备屏幕高度"
  150. },
  151. "location_ip": {
  152. "bsonType": "string",
  153. "description": "ip"
  154. },
  155. "location_latitude": {
  156. "bsonType": "double",
  157. "description": "纬度"
  158. },
  159. "location_longitude": {
  160. "bsonType": "double",
  161. "description": "经度"
  162. },
  163. "location_country": {
  164. "bsonType": "string",
  165. "description": "国家"
  166. },
  167. "location_province": {
  168. "bsonType": "string",
  169. "description": "省份"
  170. },
  171. "location_city": {
  172. "bsonType": "string",
  173. "description": "城市"
  174. },
  175. "is_finish": {
  176. "bsonType": "int",
  177. "defaultValue": 0,
  178. "description": "本次会话是否结束,0:否,1是",
  179. "enum": [{
  180. "text": "否",
  181. "value": 0
  182. }, {
  183. "text": "是",
  184. "value": 1
  185. }]
  186. },
  187. "create_time": {
  188. "bsonType": "timestamp",
  189. "description": "创建时间"
  190. }
  191. }
  192. }