@@ -929,7 +929,8 @@ sa.para = {
929929 pageLeave : false
930930 } ,
931931 autotrack_exclude_page : {
932- pageShow : [ ]
932+ pageShow : [ ] ,
933+ pageLeave : [ ]
933934 } ,
934935 is_persistent_save : {
935936 share : false ,
@@ -1035,13 +1036,26 @@ sa.setPara = function(para) {
10351036 }
10361037
10371038 sa . para . preset_properties = _ . isObject ( sa . para . preset_properties ) ? sa . para . preset_properties : { } ;
1039+
1040+ if ( ! _ . isObject ( sa . para . autotrack_exclude_page ) ) {
1041+ sa . para . autotrack_exclude_page = {
1042+ pageShow : [ ] ,
1043+ pageLeave : [ ]
1044+ } ;
1045+ }
1046+ if ( ! _ . isArray ( sa . para . autotrack_exclude_page . pageShow ) ) {
1047+ sa . para . autotrack_exclude_page . pageShow = [ ] ;
1048+ }
1049+ if ( ! _ . isArray ( sa . para . autotrack_exclude_page . pageLeave ) ) {
1050+ sa . para . autotrack_exclude_page . pageLeave = [ ] ;
1051+ }
10381052} ;
10391053
10401054sa . getServerUrl = function ( ) {
10411055 return sa . para . server_url ;
10421056} ;
10431057
1044- var LIB_VERSION = '1.17.3 ' ,
1058+ var LIB_VERSION = '1.17.4 ' ,
10451059 LIB_NAME = 'MiniProgram' ;
10461060
10471061var source_channel_standard = 'utm_source utm_medium utm_campaign utm_content utm_term' ;
@@ -3095,7 +3109,9 @@ _.sendPageLeave = function() {
30953109 prop . $url_path = router ;
30963110 prop . $title = title ;
30973111 prop . event_duration = page_stay_time ;
3098- sa . track ( '$MPPageLeave' , prop ) ;
3112+ if ( sa . para . autotrack_exclude_page . pageLeave . indexOf ( router ) === - 1 ) {
3113+ sa . track ( '$MPPageLeave' , prop ) ;
3114+ }
30993115 page_show_time = - 1 ;
31003116 }
31013117} ;
@@ -3273,7 +3289,7 @@ sa.autoTrackCustom = {
32733289 }
32743290 if ( sa . para . onshow ) {
32753291 sa . para . onshow ( sa , router , this ) ;
3276- } else if ( ! ( _ . isObject ( sa . para . autotrack_exclude_page ) && _ . isArray ( sa . para . autotrack_exclude_page . pageShow ) && sa . para . autotrack_exclude_page . pageShow . indexOf ( router ) !== - 1 ) ) {
3292+ } else if ( sa . para . autotrack_exclude_page . pageShow . indexOf ( router ) === - 1 ) {
32773293 sa . autoTrackCustom . trackCustom ( 'pageShow' , prop , '$MPViewScreen' ) ;
32783294 }
32793295 } ,
0 commit comments