PageSourceSearch

https://missionsands.com/wp-content/plugins/streamline-core/assets/dist/js/ecommerce.min.js?ver=3.4.4-beta5

js missionsands.com collected 2026-10-08 20:36:33 UTC 5,677 bytes, 1 lines download raw bytes

1window.location.href.includes("checkout")&&jQuery(function($){var fired=!1;function getTexts(){var totalEl=$("[ng-bind]").filter(function(){var s=this.getAttribute("ng-bind")||"";return/(^|[.(])\s*total\b/.test(s)}).first(),priceEl=$("[ng-bind]").filter(function(){var s=this.getAttribute("ng-bind")||"";return/(^|[.(])\s*subTotal\b/.test(s)}).first(),totalText,priceText;return{totalText:totalEl.length?totalEl.text().trim():totalEl[0]&&(totalEl[0].textContent||"").trim()||"",priceText:priceEl.length?priceEl.text().trim():priceEl[0]&&(priceEl[0].textContent||"").trim()||""}}function doFire(totalText,priceText){var numericTotal,numericPrice,totalText;fired||(numericTotal=parseFloat(totalText.replace(/[^0-9.]/g,"")),numericPrice=parseFloat(priceText.replace(/[^0-9.]/g,"")),isNaN(numericTotal)||isNaN(numericPrice)?console.warn("ecommerce.js: numericTotal or numericPrice invalid",totalText,priceText):(totalText=[{item_id:window.streamline_checkout&&streamline_checkout.unit_id||null,item_name:window.streamline_checkout&&streamline_checkout.unit_name||null,price:numericPrice,quantity:1}],"function"==typeof gtag?(gtag("event","add_to_cart",{currency:"USD",value:numericTotal,items:totalText}),gtag("event","begin_checkout",{currency:"USD",value:numericTotal,items:totalText}),console.log("ecommerce.js: fired GA4 via gtag",numericTotal,numericPrice)):window.dataLayer?(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"add_to_cart",ecommerce:{currency:"USD",value:numericTotal,items:totalText}}),window.dataLayer.push({event:"begin_checkout",ecommerce:{currency:"USD",value:numericTotal,items:totalText}}),console.log("ecommerce.js: pushed GA4 to dataLayer",numericTotal,numericPrice)):console.warn("ecommerce.js: no gtag or dataLayer available"),fired=!0))}function findAndFire(retriesLeft){var vals=getTexts();vals.totalText&&vals.priceText&&"undefined"!=typeof streamline_checkout&&streamline_checkout.unit_id&&streamline_checkout.unit_name?doFire(vals.totalText,vals.priceText):0<retriesLeft?setTimeout(function(){findAndFire(retriesLeft-1)},500):console.warn("ecommerce.js: values not ready after retries on goToStep2 click")}$(document).one("click",'button[ng-click^="checkSteptwo"]',function(){fired||findAndFire(20)})}),window.location.href.includes("thank-you")&&null!=streamline_transaction.id&&("function"==typeof gtag?gtag("event","purchase",{transaction_id:streamline_transaction.id,value:streamline_transaction.revenue,currency:"USD",tax:streamline_transaction.tax,shipping:0,trip_protection:streamline_transaction.trip_protection,departure_services:streamline_transaction.departure_services,cc_surcharge:streamline_transaction.cc_surcharge,start_date:streamline_transaction.start_date,end_date:streamline_transaction.end_date,items:[{item_id:streamline_transaction.unit_id,item_name:streamline_transaction.unit_name,affiliation:streamline_transaction.affiliation,price:streamline_transaction.rent,quantity:1}]}):window.dataLayer&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"purchase",ecommerce:{transaction_id:streamline_transaction.id,value:streamline_transaction.revenue,currency:"USD",tax:streamline_transaction.tax,shipping:0,trip_protection:streamline_transaction.trip_protection,departure_services:streamline_transaction.departure_services,cc_surcharge:streamline_transaction.cc_surcharge,start_date:streamline_transaction.start_date,end_date:streamline_transaction.end_date,items:[{item_id:streamline_transaction.unit_id,item_name:streamline_transaction.unit_name,affiliation:streamline_transaction.affiliation,price:streamline_transaction.rent,quantity:1}]}}))),"undefined"!=typeof streamline_view_item&&streamline_view_item.unit_id&&("function"==typeof gtag?gtag("event","view_item",{currency:"USD",value:streamline_view_item.unit_price,items:[{item_id:streamline_view_item.unit_id,item_name:streamline_view_item.unit_name,affiliation:streamline_view_item.affiliation,price:streamline_view_item.unit_price,quantity:1}]}):window.dataLayer&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"view_item",ecommerce:{currency:"USD",value:streamline_view_item.unit_price,items:[{item_id:streamline_view_item.unit_id,item_name:streamline_view_item.unit_name,affiliation:streamline_view_item.affiliation,price:streamline_view_item.unit_price,quantity:1}]}}))),jQuery(document).ready(function($){var searchPage=jQuery("[ng-init]").filter(function(){return-1!==this.getAttribute("ng-init").indexOf("availabilitySearch()")}),hasFired,observer;function checkElement(){0<jQuery(".no-results").length&&!hasFired&&(console.log("✅ .no-results detected. Sending 'no_results' event..."),sendEvent())}function sendEvent(){window.dataLayer&&"function"==typeof window.dataLayer.push?(console.warn("⚠️ GA4 not detected. Using dataLayer push instead."),window.dataLayer.push({event:"no_results",event_category:"Search",event_label:"No search results found",element_class:".no-results"})):"function"==typeof gtag?(console.log("📡 GA4 detected. Sending 'no_results' event..."),gtag("event","no_results",{event_category:"Search",event_label:"No search results found",element_class:".no-results"})):console.error("❌ GA4 and GTM not available. Event not sent."),hasFired=!0}console.log("Search Page: ",searchPage),0<searchPage.length&&(hasFired=!1,checkElement(),new MutationObserver(function(mutationsList){mutationsList.forEach(function(mutation){"childList"!==mutation.type&&"subtree"!==mutation.type||(console.log("🔄 DOM updated, checking for .no-results..."),checkElement())})}).observe(document.body,{childList:!0,subtree:!0}),console.log("👀 Observer started, watching for .no-results"))});

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.