1(function () { 2 window.fbTrack = function (eventName, params) { 3 var eventId = 'ev_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9); 4 var p = params || {}; 5 6 // Browser pixel (ÑкÑо не заблокований) 7 try { if (window.fbq) window.fbq('track', eventName, p, { eventID: eventId }); } catch (e) {} 8 9 // Server-side CAPI (ÑеÑез влаÑний домен â не блокÑÑÑÑÑÑ) 10 // _fbp is set asynchronously by fbevents.js â retry briefly instead of 11 // sending without it if this call happens before the pixel script loads. 12 var attempts = 0; 13 function send() { 14 var fbp = (document.cookie.match(/_fbp=([^;]+)/) || [])[1] || null; 15 var fbc = (document.cookie.match(/_fbc=([^;]+)/) || [])[1] || null; 16 if (!fbp && attempts < 5) { 17 attempts++; 18 setTimeout(send, 200); 19 return; 20 } 21 fetch('/api/track', { 22 method: 'POST', 23 headers: { 'Content-Type': 'application/json' }, 24 body: JSON.stringify({ 25 event_name: eventName, 26 event_id: eventId, 27 event_source_url: window.location.href, 28 custom_data: p, 29 user_data: { fbp: fbp, fbc: fbc } 30 }) 31 }).catch(function () {}); 32 } 33 send(); 34 }; 35})();
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.