Skip to content

Commit 056b8d4

Browse files
author
root
committed
1.15.6
1 parent 71a801c commit 056b8d4

15 files changed

+51
-21
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.15.6 (2020-6-5)
2+
* 新增:Web 可视化 Chrome 插件截图功能
3+
* 优化:App 内嵌 H5 时候,使用 file 协议加载 H5 时候导致的解析异常
4+
* 优化:全埋点的点击采集从冒泡模式改为捕获模式
5+
* 优化:增加点击图没有开启 pageview 时候的错误提示
6+
17
## 1.15.5 (2020-5-22)
28
* 新增:App 内嵌 H5 的可视化方案
39
* 新增:第四版打通方案,解决苹果手机 iframe 打通问题

heatmap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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-javascript",
3-
"version": "1.15.5",
3+
"version": "1.15.6",
44
"description": "official sensorsdata javascript sdk",
55
"main": "sensorsdata.min.js",
66
"scripts": {

plugin/sensorsdata.amd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/sensorsdata.es6.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/sensorsdata.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

product/heatmap.full.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8836,6 +8836,12 @@
88368836
me.showErrorInfo(me.requestType);
88378837
return false;
88388838
}
8839+
if (!data.page_view || Number(data.page_view) === 0) {
8840+
me.showErrorInfo(2, {
8841+
error: '点击率计算失败,没有开启autoTrack!'
8842+
});
8843+
return false;
8844+
}
88398845
var pv = parseInt(data.page_view, 10);
88408846
var heat_map_id = data.heat_map_id;
88418847
data = data.rows;
@@ -9329,7 +9335,7 @@
93299335

93309336
window.sa_jssdk_heatmap_render = function(se, data, type, url) {
93319337
sd = se;
9332-
sd.heatmap_version = '1.15.5';
9338+
sd.heatmap_version = '1.15.6';
93339339
_ = sd._;
93349340

93359341
_.bindReady = function(fn, win) {

product/sensorsdata.amd.full.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,9 @@
964964

965965
var register_event = function(element, type, handler) {
966966
var useCapture = _.isObject(sd.para.heatmap) && sd.para.heatmap.useCapture ? true : false;
967+
if (_.isObject(sd.para.heatmap) && typeof sd.para.heatmap.useCapture === 'undefined' && type === 'click') {
968+
useCapture = true;
969+
}
967970
if (element && element.addEventListener) {
968971
element.addEventListener(type, function(e) {
969972
e._getPath = fixEvent._getPath;
@@ -2242,7 +2245,7 @@
22422245

22432246
sd.setInitVar = function() {
22442247
sd._t = sd._t || 1 * new Date();
2245-
sd.lib_version = '1.15.5';
2248+
sd.lib_version = '1.15.6';
22462249
sd.is_first_visitor = false;
22472250
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
22482251
};
@@ -3061,6 +3064,9 @@
30613064
if (_.isObject(sd.para.heatmap) && sd.para.heatmap.clickmap == 'default') {
30623065
if (_.isObject(sd.para.app_js_bridge) && bridgeObj.verify_success === 'success') {
30633066
if (!isLoaded) {
3067+
var protocol = location.protocol;
3068+
var protocolArr = ['http:', 'https:'];
3069+
protocol = _.indexOf(protocolArr, protocol) > -1 ? protocol : 'https:';
30643070
_.loadScript({
30653071
success: function() {
30663072
setTimeout(function() {
@@ -3071,7 +3077,7 @@
30713077
},
30723078
error: function() {},
30733079
type: 'js',
3074-
url: location.protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
3080+
url: protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
30753081
});
30763082
} else {
30773083
sa_jssdk_app_define_mode(sd, isLoaded);

product/sensorsdata.es6.full.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ if (typeof JSON !== 'object') {
953953

954954
var register_event = function(element, type, handler) {
955955
var useCapture = _.isObject(sd.para.heatmap) && sd.para.heatmap.useCapture ? true : false;
956+
if (_.isObject(sd.para.heatmap) && typeof sd.para.heatmap.useCapture === 'undefined' && type === 'click') {
957+
useCapture = true;
958+
}
956959
if (element && element.addEventListener) {
957960
element.addEventListener(type, function(e) {
958961
e._getPath = fixEvent._getPath;
@@ -2231,7 +2234,7 @@ sd.setPreConfig = function(sa) {
22312234

22322235
sd.setInitVar = function() {
22332236
sd._t = sd._t || 1 * new Date();
2234-
sd.lib_version = '1.15.5';
2237+
sd.lib_version = '1.15.6';
22352238
sd.is_first_visitor = false;
22362239
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
22372240
};
@@ -3050,6 +3053,9 @@ sd.detectMode = function() {
30503053
if (_.isObject(sd.para.heatmap) && sd.para.heatmap.clickmap == 'default') {
30513054
if (_.isObject(sd.para.app_js_bridge) && bridgeObj.verify_success === 'success') {
30523055
if (!isLoaded) {
3056+
var protocol = location.protocol;
3057+
var protocolArr = ['http:', 'https:'];
3058+
protocol = _.indexOf(protocolArr, protocol) > -1 ? protocol : 'https:';
30533059
_.loadScript({
30543060
success: function() {
30553061
setTimeout(function() {
@@ -3060,7 +3066,7 @@ sd.detectMode = function() {
30603066
},
30613067
error: function() {},
30623068
type: 'js',
3063-
url: location.protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
3069+
url: protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
30643070
});
30653071
} else {
30663072
sa_jssdk_app_define_mode(sd, isLoaded);

product/sensorsdata.full.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,9 @@
965965

966966
var register_event = function(element, type, handler) {
967967
var useCapture = _.isObject(sd.para.heatmap) && sd.para.heatmap.useCapture ? true : false;
968+
if (_.isObject(sd.para.heatmap) && typeof sd.para.heatmap.useCapture === 'undefined' && type === 'click') {
969+
useCapture = true;
970+
}
968971
if (element && element.addEventListener) {
969972
element.addEventListener(type, function(e) {
970973
e._getPath = fixEvent._getPath;
@@ -2243,7 +2246,7 @@
22432246

22442247
sd.setInitVar = function() {
22452248
sd._t = sd._t || 1 * new Date();
2246-
sd.lib_version = '1.15.5';
2249+
sd.lib_version = '1.15.6';
22472250
sd.is_first_visitor = false;
22482251
sd.source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term';
22492252
};
@@ -3062,6 +3065,9 @@
30623065
if (_.isObject(sd.para.heatmap) && sd.para.heatmap.clickmap == 'default') {
30633066
if (_.isObject(sd.para.app_js_bridge) && bridgeObj.verify_success === 'success') {
30643067
if (!isLoaded) {
3068+
var protocol = location.protocol;
3069+
var protocolArr = ['http:', 'https:'];
3070+
protocol = _.indexOf(protocolArr, protocol) > -1 ? protocol : 'https:';
30653071
_.loadScript({
30663072
success: function() {
30673073
setTimeout(function() {
@@ -3072,7 +3078,7 @@
30723078
},
30733079
error: function() {},
30743080
type: 'js',
3075-
url: location.protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
3081+
url: protocol + '//static.sensorsdata.cn/sdk/' + sd.lib_version + '/vapph5define.min.js'
30763082
});
30773083
} else {
30783084
sa_jssdk_app_define_mode(sd, isLoaded);

0 commit comments

Comments
 (0)