|
@@ -10,5 +10,54 @@ userbehavior.js
|
|
### 自动埋点
|
|
### 自动埋点
|
|
|
|
|
|
```
|
|
```
|
|
-因为
|
|
|
|
-```
|
|
|
|
|
|
+ //基础默认配置,手动配置也是一样的
|
|
|
|
+ clickCount: true,//开启记录点击数量是否开启
|
|
|
|
+ clickDetails: true,//点击事件记录是否开启
|
|
|
|
+ mouseMovement: false,//鼠标移动事件记录是否开启
|
|
|
|
+ mouseWheel:true,//鼠标滑轮记录事件是否开启
|
|
|
|
+ context: true,//上下文记录事件是否开启
|
|
|
|
+ keyLogger: true,//键盘记录事件是否开启
|
|
|
|
+ // Action Item
|
|
|
|
+ actionItem: {
|
|
|
|
+ processOnAction: false,
|
|
|
|
+ selector: '',
|
|
|
|
+ event: ''
|
|
|
|
+ },
|
|
|
|
+ processTime: 10,//开启定时器.按秒算,0 关闭定时器
|
|
|
|
+ processData: function (results) {//每次调用的回调
|
|
|
|
+ post("/test/getdata", results);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //结果json
|
|
|
|
+ {
|
|
|
|
+ userInfo: {
|
|
|
|
+ appCodeName: navigator.appCodeName || '',
|
|
|
|
+ appName: navigator.appName || '',
|
|
|
|
+ vendor: navigator.vendor || '',
|
|
|
|
+ platform: navigator.platform || '',
|
|
|
|
+ userAgent: navigator.userAgent || '',
|
|
|
|
+ browserIdentifier: fingerprint.get()
|
|
|
|
+ },
|
|
|
|
+ time: {
|
|
|
|
+ totalTime: 0,//打开总时间
|
|
|
|
+ timeOnPage: 0,//停留在这个页面的时间
|
|
|
|
+ startTime: 0,//开始时间
|
|
|
|
+ endTime: 0 //结束时间
|
|
|
|
+ },
|
|
|
|
+ host: {
|
|
|
|
+ current_url: window.location.href,//当前访问链接
|
|
|
|
+ previous: document.referrer,//上一个访问链接
|
|
|
|
+ host_name: RegExp.$1,//当前访问链接的二级前缀,如 test.duowan.com ,那就是test
|
|
|
|
+ },
|
|
|
|
+ clicks: {
|
|
|
|
+ clickCount: 0,
|
|
|
|
+ clickDetails: []
|
|
|
|
+ },
|
|
|
|
+ mouseMovements: [],
|
|
|
|
+ contextChange: [],
|
|
|
|
+ keyLogger: [],
|
|
|
|
+ mouseCount:0,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+```
|