1((w) => { 2 w.dataLayer = w.dataLayer || []; 3 function gtag() { 4 dataLayer.push(arguments); 5 } 6 // åæå 7 gtag("js", new Date()); 8 gtag("config", "G-RXZ6EY7XTZ"); // ããã«GA4ã®æ¸¬å®IDãå ¥å 9 10 const UserAgent = w.navigator.userAgent; 11 const Location = location.href; 12 // Google Analytics ã¸ã®éä¿¡ 13 const ga_send = (parameter) => { 14 console.debug(); 15 if (typeof gtag === "function") gtag("event", "exception", parameter); 16 else console.warn("ð", { parameter, gtag: typeof gtag }); 17 }; 18 w.addEventListener("error", (event) => { 19 // ãã¡ã¤ã«åãåå¾ 20 const { filename } = event; 21 const fileName = 22 (filename?.match(".+/(.+?)([?#;].*)?$") ?? [])[1] ?? "no name"; 23 // ãã©ã¡ã¼ã¿ 24 const parameter = { 25 Location, 26 UserAgent, 27 Type: "ERROR", 28 Message: `${fileName}: ${event.lineno} - ${event.message}`, 29 fatal: false, 30 }; 31 // Google Analytics ã¸ã®éä¿¡ 32 ga_send(parameter); 33 }); 34 // æªå¦çã®Promiseæå¦ããã£ãããããªã¹ãã¼ 35 w.addEventListener("unhandledrejection", (event) => { 36 // ã¨ã©ã¼ãªãã¸ã§ã¯ãã¾ãã¯ã¡ãã»ã¼ã¸ 37 const reason = event.reason; 38 // ãã©ã¡ã¼ã¿ 39 const parameter = { 40 Location, 41 UserAgent, 42 Type: "UNHANDLEDREJECTION", 43 Message: reason?.message || reason, 44 fatal: false, 45 }; 46 // Google Analytics ã¸ã®éä¿¡ 47 ga_send(parameter); 48 }); 49})(window); 50window.cartInformation = { Comid: "" };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.