Skip to content

Commit d88cc5a

Browse files
author
shengyonggen
committed
把已经不用的可视化埋点去掉
1 parent a5067cf commit d88cc5a

File tree

10 files changed

+45
-45
lines changed

10 files changed

+45
-45
lines changed

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

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.

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.

src/sdk.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,13 +1838,15 @@ sd.sendState.sendCall = function(server_url,callback){
18381838
var me = this;
18391839

18401840
// this.ajaxCall(server_url,callback);
1841-
// this.beaconCall(server_url,callback);
1842-
1843-
this[state] = new this.stateInfo({
1844-
callback: callback,
1845-
server_url: server_url,
1846-
sendState: this
1847-
});
1841+
// if(typeof navigator === 'object' && typeof navigator.sendBeacon === 'function'){
1842+
// this.beaconCall(server_url,callback);
1843+
// }else{
1844+
this[state] = new this.stateInfo({
1845+
callback: callback,
1846+
server_url: server_url,
1847+
sendState: this
1848+
});
1849+
// }
18481850
};
18491851

18501852
// 检查是否是新用户(第一次种cookie,且在8个小时内的)

src/sensorsdata.full.amd.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,13 +1969,15 @@ sd.sendState.sendCall = function(server_url,callback){
19691969
var me = this;
19701970

19711971
// this.ajaxCall(server_url,callback);
1972-
// this.beaconCall(server_url,callback);
1973-
1974-
this[state] = new this.stateInfo({
1975-
callback: callback,
1976-
server_url: server_url,
1977-
sendState: this
1978-
});
1972+
// if(typeof navigator === 'object' && typeof navigator.sendBeacon === 'function'){
1973+
// this.beaconCall(server_url,callback);
1974+
// }else{
1975+
this[state] = new this.stateInfo({
1976+
callback: callback,
1977+
server_url: server_url,
1978+
sendState: this
1979+
});
1980+
// }
19791981
};
19801982

19811983
// 检查是否是新用户(第一次种cookie,且在8个小时内的)
@@ -3484,20 +3486,21 @@ saEvent.send = function(p, callback) {
34843486
if (typeof console === 'object' && console.log) {
34853487
try {console.log(err)} catch (e) {};
34863488
}
3487-
/*
3489+
34883490
(function(){
34893491

34903492
var sd = window['sensorsDataAnalytic201505'];
34913493
if(typeof sd === 'string'){
34923494
sd = window[sd];
3493-
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object')){
3494-
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:err,$url:location.href});
3495+
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object') && (typeof sd.para === 'object') && sd.para.is_debug){
3496+
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:JSON.stringify(err),$url:location.href});
34953497
}
34963498
}
34973499

34983500

34993501
})();
3500-
*/
3502+
3503+
35013504
}
35023505

35033506

src/sensorsdata.full.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,13 +1966,15 @@ sd.sendState.sendCall = function(server_url,callback){
19661966
var me = this;
19671967

19681968
// this.ajaxCall(server_url,callback);
1969-
// this.beaconCall(server_url,callback);
1970-
1971-
this[state] = new this.stateInfo({
1972-
callback: callback,
1973-
server_url: server_url,
1974-
sendState: this
1975-
});
1969+
// if(typeof navigator === 'object' && typeof navigator.sendBeacon === 'function'){
1970+
// this.beaconCall(server_url,callback);
1971+
// }else{
1972+
this[state] = new this.stateInfo({
1973+
callback: callback,
1974+
server_url: server_url,
1975+
sendState: this
1976+
});
1977+
// }
19761978
};
19771979

19781980
// 检查是否是新用户(第一次种cookie,且在8个小时内的)
@@ -3481,20 +3483,21 @@ saEvent.send = function(p, callback) {
34813483
if (typeof console === 'object' && console.log) {
34823484
try {console.log(err)} catch (e) {};
34833485
}
3484-
/*
3486+
34853487
(function(){
34863488

34873489
var sd = window['sensorsDataAnalytic201505'];
34883490
if(typeof sd === 'string'){
34893491
sd = window[sd];
3490-
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object')){
3491-
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:err,$url:location.href});
3492+
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object') && (typeof sd.para === 'object') && sd.para.is_debug){
3493+
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:JSON.stringify(err),$url:location.href});
34923494
}
34933495
}
34943496

34953497

34963498
})();
3497-
*/
3499+
3500+
34983501
}
34993502

35003503

src/sensorsdata.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,21 @@ sd.initPara = function(para){
150150
if (typeof console === 'object' && console.log) {
151151
try {console.log(err)} catch (e) {};
152152
}
153-
/*
153+
154154
(function(){
155155

156156
var sd = window['sensorsDataAnalytic201505'];
157157
if(typeof sd === 'string'){
158158
sd = window[sd];
159-
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object')){
160-
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:err,$url:location.href});
159+
if((sd != null) && (typeof sd === 'function' || typeof sd === 'object') && (typeof sd.para === 'object') && sd.para.is_debug){
160+
sd.track && sd.track('_js_sdk_error',{_js_sdk_error_msg:JSON.stringify(err),$url:location.href});
161161
}
162162
}
163163

164164

165165
})();
166-
*/
166+
167+
167168
}
168169

169170

vendor.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

vendor.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

vtrack.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)