Skip to content

Commit a065579

Browse files
author
shengyonggen
committed
Release 1.14.14
1 parent 95a1775 commit a065579

15 files changed

+290
-261
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.14.14(2021-07-19)
2+
1. 修复
3+
- 修复自定义属性被预置属性覆盖问题
4+
- 修复 `Taro 3.1` 及以上框架,小程序内嵌元素自定义属性无法采集的问题
5+
16
## 1.14.13(2021-07-9)
27
1. 新增
38
- `$url_path` 设置为所有事件都有的预置属性

demo/remax/src/pages/index/index.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ export default () => {
99
getApp().sensors.track('$MPClick');
1010
}
1111

12-
return (
13-
<View className={styles.app}>
14-
<View className={styles.header}>
15-
<Image
16-
src="https://gw.alipayobjects.com/mdn/rms_b5fcc5/afts/img/A*OGyZSI087zkAAAAAAAAAAABkARQnAQ"
17-
className={styles.logo}
18-
alt="logo"
19-
/>
20-
<View className={styles.text}>
21-
编辑 <Text className={styles.path}>src/pages/index/index.js</Text>{' '}
22-
开始
23-
</View>
24-
<Button type='button' size='large' onTap={clickHandle}>测试点击</Button>
25-
</View>
26-
</View>
27-
);
12+
// return (
13+
// <View className={styles.app}>
14+
// <View className={styles.header}>
15+
// <Image
16+
// src="https://gw.alipayobjects.com/mdn/rms_b5fcc5/afts/img/A*OGyZSI087zkAAAAAAAAAAABkARQnAQ"
17+
// className={styles.logo}
18+
// alt="logo"
19+
// />
20+
// <View className={styles.text}>
21+
// 编辑 <Text className={styles.path}>src/pages/index/index.js</Text>{' '}
22+
// 开始
23+
// </View>
24+
// <Button type='button' size='large' onTap={clickHandle}>测试点击</Button>
25+
// </View>
26+
// </View>
27+
// );
2828
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sa-sdk-miniprogram",
3-
"version": "1.14.13",
3+
"version": "1.14.14",
44
"description": "sensorsdata miniprogram sdk",
55
"main": "sensorsdata.min.js",
66
"scripts": {

product/sensorsdata.custom.es6.full.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sa.para = {
3434
},
3535
preset_events: {
3636
moments_page: false,
37+
defer_track: false
3738
},
3839
batch_send: true
3940
};
@@ -155,7 +156,7 @@ var ArrayProto = Array.prototype,
155156
slice = ArrayProto.slice,
156157
toString = ObjProto.toString,
157158
hasOwnProperty = ObjProto.hasOwnProperty,
158-
LIB_VERSION = '1.14.13',
159+
LIB_VERSION = '1.14.14',
159160
LIB_NAME = 'MiniProgram';
160161

161162
var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
@@ -1975,8 +1976,6 @@ sa.initWithOpenid = function(options, callback) {
19751976
});
19761977
};
19771978

1978-
1979-
19801979
sa.setWebViewUrl = function(url, after_hash) {
19811980
if (!_.isString(url) || url === '') {
19821981
logger.info('error:请传入正确的 URL 格式');
@@ -1993,7 +1992,6 @@ sa.setWebViewUrl = function(url, after_hash) {
19931992
nurl = '';
19941993
var distinct_id = sa.store.getDistinctId() || "",
19951994
first_id = sa.store.getFirstId() || "",
1996-
name = '_sasdk',
19971995
idIndex;
19981996

19991997
if (_.urlSafeBase64 && _.urlSafeBase64.encode) {
@@ -2238,9 +2236,6 @@ sa.quick = function() {
22382236
};
22392237
sa.appLaunch = function(option, prop) {
22402238
var obj = {};
2241-
if (_.isObject(prop)) {
2242-
obj = _.extend(obj, prop)
2243-
}
22442239
if (option && option.scene) {
22452240
current_scene = option.scene;
22462241
obj.$scene = _.getMPScene(option.scene);
@@ -2278,13 +2273,13 @@ sa.appLaunch = function(option, prop) {
22782273

22792274
obj.$url_query = _.setQuery(option.query);
22802275

2276+
if (_.isObject(prop)) {
2277+
obj = _.extend(obj, prop);
2278+
}
22812279
sa.track('$MPLaunch', obj);
22822280
}
22832281
sa.appShow = function(option, prop) {
22842282
var obj = {};
2285-
if (_.isObject(prop)) {
2286-
obj = _.extend(obj, prop)
2287-
}
22882283
mpshow_time = (new Date()).getTime();
22892284
if (option && option.scene) {
22902285
current_scene = option.scene;
@@ -2315,19 +2310,22 @@ sa.appShow = function(option, prop) {
23152310
$latest_scene: obj.$scene
23162311
});
23172312
obj.$url_query = _.setQuery(option.query);
2313+
if (_.isObject(prop)) {
2314+
obj = _.extend(obj, prop);
2315+
}
23182316
sa.track('$MPShow', obj);
23192317
}
23202318

23212319
sa.appHide = function(prop) {
23222320
var current_time = (new Date()).getTime();
23232321
var obj = {};
2324-
if (_.isObject(prop)) {
2325-
obj = _.extend(obj, prop);
2326-
}
23272322
obj.$url_path = _.getCurrentPath();
23282323
if (mpshow_time && (current_time - mpshow_time > 0) && ((current_time - mpshow_time) / 3600000 < 24)) {
23292324
obj.event_duration = (current_time - mpshow_time) / 1000;
23302325
}
2326+
if (_.isObject(prop)) {
2327+
obj = _.extend(obj, prop);
2328+
}
23312329
sa.track('$MPHide', obj);
23322330
sa.sendStrategy.onAppHide();
23332331
}
@@ -2356,12 +2354,12 @@ sa.pageShow = function(prop) {
23562354
obj.$url_path = router;
23572355
sa.status.last_referrer = sa_referrer;
23582356
obj.$url_query = currentPage.sensors_mp_url_query ? currentPage.sensors_mp_url_query : '';
2359-
if (_.isObject(prop)) {
2360-
obj = _.extend(obj, prop);
2361-
};
23622357
obj = _.extend(obj, _.getUtmFromPage());
23632358
_.setPageSfSource(obj);
2364-
sa.track('$MPViewScreen', obj)
2359+
if (_.isObject(prop)) {
2360+
obj = _.extend(obj, prop);
2361+
}
2362+
sa.track('$MPViewScreen', obj);
23652363
sa_referrer = router;
23662364
sa.status.referrer = router;
23672365
}

product/sensorsdata.custom.full.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sa.para = {
3434
},
3535
preset_events: {
3636
moments_page: false,
37+
defer_track: false
3738
},
3839
batch_send: true
3940
};
@@ -155,7 +156,7 @@ var ArrayProto = Array.prototype,
155156
slice = ArrayProto.slice,
156157
toString = ObjProto.toString,
157158
hasOwnProperty = ObjProto.hasOwnProperty,
158-
LIB_VERSION = '1.14.13',
159+
LIB_VERSION = '1.14.14',
159160
LIB_NAME = 'MiniProgram';
160161

161162
var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
@@ -1975,8 +1976,6 @@ sa.initWithOpenid = function(options, callback) {
19751976
});
19761977
};
19771978

1978-
1979-
19801979
sa.setWebViewUrl = function(url, after_hash) {
19811980
if (!_.isString(url) || url === '') {
19821981
logger.info('error:请传入正确的 URL 格式');
@@ -1993,7 +1992,6 @@ sa.setWebViewUrl = function(url, after_hash) {
19931992
nurl = '';
19941993
var distinct_id = sa.store.getDistinctId() || "",
19951994
first_id = sa.store.getFirstId() || "",
1996-
name = '_sasdk',
19971995
idIndex;
19981996

19991997
if (_.urlSafeBase64 && _.urlSafeBase64.encode) {
@@ -2238,9 +2236,6 @@ sa.quick = function() {
22382236
};
22392237
sa.appLaunch = function(option, prop) {
22402238
var obj = {};
2241-
if (_.isObject(prop)) {
2242-
obj = _.extend(obj, prop)
2243-
}
22442239
if (option && option.scene) {
22452240
current_scene = option.scene;
22462241
obj.$scene = _.getMPScene(option.scene);
@@ -2278,13 +2273,13 @@ sa.appLaunch = function(option, prop) {
22782273

22792274
obj.$url_query = _.setQuery(option.query);
22802275

2276+
if (_.isObject(prop)) {
2277+
obj = _.extend(obj, prop);
2278+
}
22812279
sa.track('$MPLaunch', obj);
22822280
}
22832281
sa.appShow = function(option, prop) {
22842282
var obj = {};
2285-
if (_.isObject(prop)) {
2286-
obj = _.extend(obj, prop)
2287-
}
22882283
mpshow_time = (new Date()).getTime();
22892284
if (option && option.scene) {
22902285
current_scene = option.scene;
@@ -2315,19 +2310,22 @@ sa.appShow = function(option, prop) {
23152310
$latest_scene: obj.$scene
23162311
});
23172312
obj.$url_query = _.setQuery(option.query);
2313+
if (_.isObject(prop)) {
2314+
obj = _.extend(obj, prop);
2315+
}
23182316
sa.track('$MPShow', obj);
23192317
}
23202318

23212319
sa.appHide = function(prop) {
23222320
var current_time = (new Date()).getTime();
23232321
var obj = {};
2324-
if (_.isObject(prop)) {
2325-
obj = _.extend(obj, prop);
2326-
}
23272322
obj.$url_path = _.getCurrentPath();
23282323
if (mpshow_time && (current_time - mpshow_time > 0) && ((current_time - mpshow_time) / 3600000 < 24)) {
23292324
obj.event_duration = (current_time - mpshow_time) / 1000;
23302325
}
2326+
if (_.isObject(prop)) {
2327+
obj = _.extend(obj, prop);
2328+
}
23312329
sa.track('$MPHide', obj);
23322330
sa.sendStrategy.onAppHide();
23332331
}
@@ -2356,12 +2354,12 @@ sa.pageShow = function(prop) {
23562354
obj.$url_path = router;
23572355
sa.status.last_referrer = sa_referrer;
23582356
obj.$url_query = currentPage.sensors_mp_url_query ? currentPage.sensors_mp_url_query : '';
2359-
if (_.isObject(prop)) {
2360-
obj = _.extend(obj, prop);
2361-
};
23622357
obj = _.extend(obj, _.getUtmFromPage());
23632358
_.setPageSfSource(obj);
2364-
sa.track('$MPViewScreen', obj)
2359+
if (_.isObject(prop)) {
2360+
obj = _.extend(obj, prop);
2361+
}
2362+
sa.track('$MPViewScreen', obj);
23652363
sa_referrer = router;
23662364
sa.status.referrer = router;
23672365
}

0 commit comments

Comments
 (0)