Skip to content

Commit

Permalink
Release 1.17.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shengyonggen committed Mar 11, 2022
1 parent c541426 commit c4701d6
Show file tree
Hide file tree
Showing 14 changed files with 132 additions and 31 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.17.4(2022-3-11)
1. 新增
- 支持动态配置制定页面的 `$MPPageLeave` 采集规则


## 1.17.3(2022-1-13)
1. 新增
- 支持自定义属性配置插件
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sa-sdk-miniprogram",
"version": "1.17.3",
"version": "1.17.4",
"description": "sensorsdata miniprogram sdk",
"main": "sensorsdata.min.js",
"scripts": {
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.custom.es6.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -823,13 +824,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -2883,7 +2897,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3061,7 +3077,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.custom.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -826,13 +827,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -2886,7 +2900,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3064,7 +3080,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.es6.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -1035,13 +1036,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -3095,7 +3109,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3273,7 +3289,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -1038,13 +1039,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -3098,7 +3112,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3276,7 +3292,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.plugin.es6.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -1032,13 +1033,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -3092,7 +3106,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3270,7 +3286,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
24 changes: 20 additions & 4 deletions product/sensorsdata.plugin.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,8 @@ sa.para = {
pageLeave: false
},
autotrack_exclude_page: {
pageShow: []
pageShow: [],
pageLeave: []
},
is_persistent_save: {
share: false,
Expand Down Expand Up @@ -1035,13 +1036,26 @@ sa.setPara = function(para) {
}

sa.para.preset_properties = _.isObject(sa.para.preset_properties) ? sa.para.preset_properties : {};

if (!_.isObject(sa.para.autotrack_exclude_page)) {
sa.para.autotrack_exclude_page = {
pageShow: [],
pageLeave: []
};
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageShow)) {
sa.para.autotrack_exclude_page.pageShow = [];
}
if (!_.isArray(sa.para.autotrack_exclude_page.pageLeave)) {
sa.para.autotrack_exclude_page.pageLeave = [];
}
};

sa.getServerUrl = function() {
return sa.para.server_url;
};

var LIB_VERSION = '1.17.3',
var LIB_VERSION = '1.17.4',
LIB_NAME = 'MiniProgram';

var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
Expand Down Expand Up @@ -3095,7 +3109,9 @@ _.sendPageLeave = function() {
prop.$url_path = router;
prop.$title = title;
prop.event_duration = page_stay_time;
sa.track('$MPPageLeave', prop);
if (sa.para.autotrack_exclude_page.pageLeave.indexOf(router) === -1) {
sa.track('$MPPageLeave', prop);
}
page_show_time = -1;
}
};
Expand Down Expand Up @@ -3273,7 +3289,7 @@ sa.autoTrackCustom = {
}
if (sa.para.onshow) {
sa.para.onshow(sa, router, this);
} else if (!(_.isObject(sa.para.autotrack_exclude_page) && _.isArray(sa.para.autotrack_exclude_page.pageShow) && sa.para.autotrack_exclude_page.pageShow.indexOf(router) !== -1)) {
} else if (sa.para.autotrack_exclude_page.pageShow.indexOf(router) === -1) {
sa.autoTrackCustom.trackCustom('pageShow', prop, '$MPViewScreen');
}
},
Expand Down
2 changes: 1 addition & 1 deletion sensorsdata.custom.es6.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.custom.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.es6.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.plugin.es6.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sensorsdata.plugin.min.js

Large diffs are not rendered by default.

0 comments on commit c4701d6

Please sign in to comment.