소스 검색

JS错误统计: 具体到页面,缩小查错范围

Michael Wang 5 년 전
부모
커밋
175dad8360
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/utils/monitors.js

+ 1 - 1
src/utils/monitors.js

@@ -40,7 +40,7 @@ window.addEventListener("error", function(event) {
   // );
   window._hmt.push([
     "_trackEvent",
-    "全局JS错误",
+    "全局JS错误:" + window.location.pathname,
     event.message,
     event.error.stack.replace(/\n/g, "||||"),
   ]);