1/** 2 * Facebook Pixel init. Expects window.GetPixelIds (array of pixel ID strings) and window.trackMetaPixelEvent (stub) to exist. 3 * Only loads fbq, inits pixels, and flushes the event queue. Does not redefine trackMetaPixelEvent. 4 */ 5(function () { 6 if (window._fbPixelInitialized) { 7 flushQueuedEvents(); 8 return; 9 } 10 window._fbPixelInitialized = true; 11 function flushQueuedEvents() { 12 if (typeof window._fbqEventQueue === 'undefined' || !window._fbqEventQueue.length) return; 13 if (typeof window.fbq !== 'function') return; 14 while (window._fbqEventQueue.length) { window.fbq('track', window._fbqEventQueue.shift()); } 15 } 16 var pixels = typeof window.GetPixelIds === 'function' ? window.GetPixelIds() : []; 17 if (pixels.length === 0) return; 18 !function (f, b, e, v, n, t, s) { 19 if (f.fbq) return; n = f.fbq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments); }; 20 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; 21 t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s); 22 }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); 23 for (var i = 0; i < pixels.length; i++) window.fbq('init', pixels[i]); 24 var t = setInterval(function () { if (typeof window.fbq === 'function') { clearInterval(t); flushQueuedEvents(); } }, 100); 25 setTimeout(function () { clearInterval(t); }, 10000); 26})();
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.