Authored by 姜枫

Merge branch 'feature/app-flag' into 'master'

Feature/app flag

一、PC/WAP上报日志新增字段
通用字段(H5自己算,郝肖肖&龙欢)
1.app_flag(简写apf):,是否app内嵌页面,Y是,N否;
2.time_stamp(简写ts):点击事件戳,APP端用户点击时记录的服务器时间;

See merge request !1
{
"name": "yas-jssdk",
"version": "1.0.17",
"version": "1.0.18",
"description": "YOHO!采集系统的前端js的开发包",
"keywords": ["YOHO!", "Acquisition", "System", "JS-SDK"],
"homepage": "",
... ...
... ... @@ -35,7 +35,8 @@ var appInfo = {
fst: 0, //firstScreenTime
// dt:document.title,//document title
sv: '', // YAS版本
ab: cookies('ab_5') || ''
ab: cookies('ab_5') || '',
apf: window.location.search.indexOf('app_version=') >= 0 ? 'Y' : 'N'
};
//获取跟踪ID
... ... @@ -379,6 +380,7 @@ _yas.sendMouseEvent = function(e, flag) {
y: pos.y,
et: e.type
};
mp.ts = (new Date()).getTime();
var info = util.merge(appInfo, custInfo);
info = util.merge(info, browserInfo);
info = util.merge(info, mp);
... ... @@ -395,6 +397,7 @@ _yas.sendMouseEvent = function(e, flag) {
* 取值是false时, 记录cookie, 待进入新页面后通过send方法将cookie中的事件记录发送并清空。
*/
_yas.sendCustomInfo = function(json, flag) {
json.ts = (new Date()).getTime(); // 事件时间戳
if (!flag) {
var string = JSON.stringify(json);
cookies('_yascustjson', string, {
... ...