1// public/js/tracking.js 2 3window.TrackingSystem = { 4 getDeviceType() { 5 const ua = navigator.userAgent.toLowerCase(); 6 if (/mobile|android|iphone|ipad|tablet/.test(ua)) { 7 return "mob"; 8 } 9 return "pc"; 10 }, 11 12 trackTouchPoint(eventName, data = {}) { 13 const deviceType = this.getDeviceType(); 14 15 const payload = { 16 type: deviceType, 17 ...data 18 }; 19 20 console.log(`[Tracking] ${eventName}`, payload); 21 22 if (typeof window.trackTouchPoint === 'function') { 23 window.trackTouchPoint(eventName, payload); 24 } else { 25 console.warn('trackTouchPoint function not found!'); 26 } 27 } 28};
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.