PageSourceSearch

https://kota189.ink/js/facebook-pixel-worker.js

js kota189.ink collected 2026-10-04 01:53:35 UTC 8,503 bytes, 1 lines download raw bytes

1var otButtonCheckoutWorker='.bettercart_checkout,[name^="checkout"],[name^="checkout"] .loader-button__text,.shopify-payment-button__button,.btn-checkout,a.fbq-checkout,.checkout_btn,.OTCheckout,.OTCheckout span,#cart .action_button.right, shop-pay-wallet-button, shop-pay-wallet-button button, shop-pay-wallet-button slot';function otDetectPixels(t){console.log("%c Omega Facebook pixels: Event tracking using the Web worker codebase","color: black; background: #EFDCCC;padding: 5px; border-radius: 5px");let e={...OT_DATA_CUSTOMER__TRACK_FB};""!=ot_ip&&(e={...e,client_ip_address:ot_ip}),"FREE"==omegaFBSettings?.settings?.plan_configs?.plan_type&&omegaFBSettings?.settings?.plan_configs?.order_remain<=0||t.forEach(t=>{fbq("init",t,e)})}async function otHandleCheckWorkingPage(){return!await otDisagreeForTracking()&&"undefined"!=typeof omegaFBSettings&&void 0!==omegaFBSettings.settings.is_enable_web_pixel&&"0"!=omegaFBSettings.settings.is_enable_web_pixel&&"1"==omegaFBSettings.settings.enable}localStorage.removeItem("ot_tracking_ic_shop_pay"),(async()=>{await otHandleCheckWorkingPage()&&otMultiFacebookPixelWorker({},omegaFBSettings.settings)})();var debounceTimeout=null;async function otTrackViewContentWorker(n){var o="1"==omegaFBSettings?.settings?.content_type_event?"product":"product_group";if("undefined"!=typeof arrayFBPixelTrack&&0<arrayFBPixelTrack.length&&-1<fb_pageURL.indexOf("/products/")){r=-1<fb_pageURL.indexOf("?")?(r=fb_pageURL.split("?"))[0]+".json":fb_pageURL+".json";var r=await otGetInfoProductByLink(r);-1<r.title.indexOf("'")&&(r.title=r.title.replace(/'/g,""));let e=ot_getUrlParam("variant"),t=e?""+e:""+meta.product.variants[0].id,a=("product_group"==o&&(t=void 0!==r.id?""+r.id:""+meta.product.id),r.variants[0].price);
1null!=e&&meta.product.variants.forEach(t=>{t.id==e&&(a=parseInt(t.price)/100)}),otCheckEnableTracking("pixel_track_viewcontent")&&fbq("track","ViewContent",{content_ids:[t],content_type:o,value:a,content_name:r.title,currency:Shopify.currency.active},{eventID:n}),!otCheckEnableTracking("capi_track_viewcontent")||"FREE"==omegaFBSettings?.settings?.plan_configs?.plan_type&&omegaFBSettings?.settings?.plan_configs?.order_remain<=0||trackEventFBConversionAPI({},{action:"ViewContent",event_id:n,event_source_url:fb_pageURL,content_ids:[t],content_type:o,value:a,content_name:r.title,currency:Shopify.currency.active,pixels:arrayFBPixelTrack,shop:Shopify.shop,obj_fbp_fbc:otGetAttributeFBCAndFBP(),...OT_DATA_CUSTOMER,...ot_information_campaign})}}setTimeout(()=>{new MutationObserver(function(t){t.forEach(function(t){debounceTimeout&&clearTimeout(debounceTimeout),debounceTimeout=setTimeout(async()=>{var t,e=await otHandleCheckWorkingPage();null!=localStorage.getItem("OT_DATA_TRIGGER_ATC_NEW_TRIGGER")?e?(t=JSON.parse(localStorage.getItem("OT_DATA_TRIGGER_ATC_NEW_TRIGGER")),omegaCallBackAddToCartTrigger(t)):localStorage.removeItem("OT_DATA_TRIGGER_ATC_NEW_TRIGGER"):e&&checkAddToCartEvent(),debounceTimeout=null},500)})}).observe(document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})},1e3);var lastVariantId=ot_getUrlParam("variant");let observerDetectVariant=new MutationObserver(()=>{requestAnimationFrame(()=>{var t=ot_getUrlParam("variant");t&&t!==lastVariantId&&(lastVariantId=t,otTrackViewContentWorker(generateEventID(36)))})});function checkAddToCartEvent(){var i={};getItemOnCartPageFB(function(e){var t=localStorage.getItem("item_count");localStorage.setItem("OTPXADDED",1),t!=e.item_count&&window.localStorage.setItem("item_count",e.item_count);let r="1"==omegaFBSettings.settings.content_type_event?"product":"product_group";if(0<e.items.length&&"shipping-protection"!=e.items[0].handle&&t<e.item_count){let a=e.items[0],n=(localStorage.setItem("OTPXADDED",0),localStorage.setItem("item_count",e.item_count),""+a.variant_id),o=("product_group"==r&&(n=""+a.product_id),generateEventID(36)),t;otCheckEnableTracking("pixel_track_addtocart")&&arrayFBPixelTrack.forEach(function(t,e){otfbq(""+t,"AddToCart",{content_ids:[n],content_type:r,value:parseInt(a.price)/100,content_name:a.product_title,currency:Shopify.currency.active},o)}),otCheckEnableTracking("capi_track_addtocart")&&(t=detectLastInfoATCByProductId(a.product_id,e.items),trackEventFBConversionAPI(i,{action:"AddToCart",event_id:o,event_source_url:fb_pageURL,content_ids:[n],content_type:r,value:parseInt(a.price)/100,content_name:a.product_title,currency:Shopify.currency.active,pixels:arrayFBPixelTrack,shop:Shopify.shop,products:t,obj_fbp_fbc:otGetAttributeFBCAndFBP(),...OT_DATA_CUSTOMER,...ot_information_campaign}))}})}async function otMultiFacebookPixelWorker(t,e){let n="1"==e.content_type_event?"product":"product_group";if("undefined"!=typeof arrayFBPixelTrack&&0<arrayFBPixelTrack.length){if(otDetectPixels(arrayFBPixelTrack),-1==fb_pageURL.indexOf("/products/")&&"1"!=e.is_enable_trigger&&(o=generateEventID(36),otCheckEnableTracking("pixel_track_pageview"))&&fbq("track","PageView",{},{eventID:o}),-1<fb_pageURL.indexOf("/products/")){r=-1<fb_pageURL.indexOf("?")?(r=fb_pageURL.split("?"))[0]+".json":fb_pageURL+".json";var o=await otGetInfoProductByLink(r),r=(-1<o.title.indexOf("'")&&(o.title=o.title.replace(/'/g,"")),generateEventID(36));let e=ot_getUrlParam("variant");e??meta.product.variants[0].id;"product_group"==n&&(void 0!==o.id?o:meta.product).id;o.variants[0].price;let a;
1null!=e&&meta.product.variants.forEach(t=>{t.id==e&&(a=parseInt(t.price)/100)}),otCheckEnableTracking("pixel_track_pageview")&&fbq("track","PageView",{},{eventID:r}),otTrackViewContentWorker(r)}-1<fb_pageURL.indexOf("/search")&&(o=generateEventID(36),otCheckEnableTracking("pixel_track_search")&&fbq("track","Search",{search_string:ot_getUrlParam("q")||""},{eventID:o}),otCheckEnableTracking("capi_track_search"))&&trackEventFBConversionAPI(t,{action:"Search",event_id:o,search_string:ot_getUrlParam("q")||"",event_source_url:fb_pageURL,pixels:arrayFBPixelTrack,shop:Shopify.shop,obj_fbp_fbc:otGetAttributeFBCAndFBP(),...OT_DATA_CUSTOMER,...ot_information_campaign}),"1"!=e.is_enable_trigger&&document.addEventListener("click",function(t){(otEventClickIsMatchesDom(t,(2!=e.is_enable_web_pixel||!window?.ShopifyPay)&&2==e.is_enable_web_pixel?"ot_pixel_detect-sample":otButtonCheckoutWorker,otListAllCustomCheckout)||t.target.matches("shopify-google-pay-button, shopify-paypal-button, shopify-apple-pay-button"))&&otTrackICWorker(arrayFBPixelTrack,e,n)})}}function otTrackICWorker(t,e,o){var r={},i=JSON.parse(localStorage.getItem("ot_cart"));if(0<i?.items?.length){let e=[],a=[],n=[];i.items.forEach(function(t){e.push("product_group"==o?""+t.product_id:""+t.variant_id),a.push(t.product_title),n.push({id:t.product_id,title:t.product_title})});var c=generateEventID(36);otCheckEnableTracking("pixel_track_checkout")&&fbq("track","InitiateCheckout",{content_type:o,content_ids:e,currency:Shopify.currency.active,value:parseFloat(i.total_price)/100,num_items:i.item_count,content_name:a},{eventID:c}),otCheckEnableTracking("capi_track_checkout")&&trackEventFBConversionAPIByBeacon(r,{action:"InitiateCheckout",event_id:c,event_source_url:fb_pageURL,content_ids:e,content_type:o,num_items:i.item_count,value:parseFloat(i.total_price)/100,content_name:a,currency:Shopify.currency.active,pixels:t,shop:Shopify.shop,products:n,obj_fbp_fbc:otGetAttributeFBCAndFBP(),...OT_DATA_CUSTOMER,...ot_information_campaign})}else if(void 0!==meta.product){let e=generateEventID(36);otCheckEnableTracking("pixel_track_checkout")&&t.forEach(function(t){otfbq(""+t,"InitiateCheckout",{content_type:o,content_ids:"product_group"==o?[""+meta.product.id]:[""+meta.product.variants[0].id],currency:Shopify.currency.active,value:meta.product.variants[0].price,num_items:1,content_name:meta.product.variants[0].name},e)}),otCheckEnableTracking("capi_track_checkout")&&trackEventFBConversionAPIByBeacon(r,{action:"InitiateCheckout",event_id:e,event_source_url:fb_pageURL,content_ids:"product_group"==o?[""+meta.product.id]:[""+meta.product.variants[0].id],content_type:o,num_items:1,value:meta.product.variants[0].price,content_name:meta.product.variants[0].name,currency:Shopify.currency.active,pixels:t,shop:Shopify.shop,products:[{id:meta.product.id,title:meta.product.variants[0].name}],obj_fbp_fbc:otGetAttributeFBCAndFBP(),...OT_DATA_CUSTOMER,...ot_information_campaign})}window?.ShopifyPay&&localStorage.setItem("ot_tracking_ic_shop_pay","true")}observerDetectVariant.observe(document.body,{childList:!0,subtree:!0});

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.