PageSourceSearch

https://pintofscience.co.uk/_resources/themes/pos18/js/components/collector.min.js?m=1777458032

js pintofscience.co.uk collected 2026-10-01 10:18:29 UTC 3,751 bytes, 1 lines download raw bytes

1!function(e,t){"use strict";var i={TAG_ID:"",REDDIT_PIXEL_ID:"",DEFAULT_CURRENCY:"USD",DEBUG:!1};function a(){i.DEBUG&&e.console&&console.log.apply(console,["[Tracking]"].concat(Array.prototype.slice.call(arguments)))}function n(t){i.DEBUG&&e.console&&console.warn&&console.warn("[Tracking] "+t)}function r(){"function"==typeof e.gtag?e.gtag.apply(e,arguments):n("window.gtag is not callable. Ensure init() has been called or gtag.js is loaded.")}function o(){"function"==typeof e.rdt?e.rdt.apply(e,arguments):n("window.rdt is not callable. Ensure init() has been called or the Reddit Pixel is loaded.")}function c(e){return e&&e.currency||i.DEFAULT_CURRENCY}function d(e,t){var i={item_id:e.id,item_name:e.name,price:e.price,quantity:e.quantity||1,index:t||0};return e.brand&&(i.item_brand=e.brand),e.category&&(i.item_category=e.category),e.variant&&(i.item_variant=e.variant),e.coupon&&(i.coupon=e.coupon),e.discount&&(i.discount=e.discount),e.affiliation&&(i.affiliation=e.affiliation),i}e.Tracking={CONFIG:i,setConfig:function(e){if(e&&"object"==typeof e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);a("Config updated:",i)}else n("setConfig: expected a plain object.")},init:function(){var r;!function(i){if(i){if("function"!=typeof e.gtag){var r=t.createElement("script");r.async=!0,r.src="https://www.googletagmanager.com/gtag/js?id="+encodeURIComponent(i),t.head.appendChild(r),e.dataLayer=e.dataLayer||[],e.gtag=function(){e.dataLayer.push(arguments)}}e.gtag("js",new Date),e.gtag("config",i),a("gtag.js initialised:",i)}else n("TAG_ID is empty - skipping gtag.js initialisation.")}(i.TAG_ID),(r=i.REDDIT_PIXEL_ID)?(function(e,t){if(!e.rdt){var i=e.rdt=function(){i.sendEvent?i.sendEvent.apply(i,arguments):i.callQueue.push(arguments)};i.callQueue=[];var a=t.createElement("script");a.src="https://www.redditstatic.com/ads/v3/pixel.js",a.async=!0,a.defer=!0;var n=t.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}}(e,t),e.rdt("init",r,{optOut:!1,useDecimalCurrencyValues:!0}),a("Reddit Pixel initialised:",r)):n("REDDIT_PIXEL_ID is empty - skipping Reddit Pixel initialisation."),a("Tracking initialised.")},trackPageVisit:function(i){var n=(i=i||{}).pageTitle||t.title,c=i.pageUrl||e.location.href;r("event","page_view",{page_title:n,page_location:c}),o("track","PageVisit"),a("Tracked: PageVisit",{title:n,url:c})},trackAddToCart:function(e){if(e&&e.id){var t=e.quantity||1,i=c(e),u=parseFloat((e.price*t).toFixed(2));r("event","add_to_cart",{currency:i,value:u,items:[d(e,0)]}),o("track","AddToCart",{itemCount:t,value:u,currency:i,products:[{id:e.id,name:e.name,category:e.category||""}]}),a("Tracked: AddToCart",e)}else n("trackAddToCart: item.id is required.")},trackRemoveFromCart:function(e){if(e&&e.id){var t=e.quantity||1,i=c(e),u=parseFloat((e.price*t).toFixed(2));r("event","remove_from_cart",{currency:i,value:u,items:[d(e,0)]}),o("track","Custom",{customEventName:"RemoveFromCart",itemCount:t,value:u,currency:i,products:[{id:e.id,name:e.name,category:e.category||""}]}),a("Tracked: RemoveFromCart",e)}else n("trackRemoveFromCart: item.id is required.")},trackPurchase:function(e){if(e&&e.id){var t=e.currency||i.DEFAULT_CURRENCY,c=e.items||[],u={transaction_id:e.id,value:e.value,currency:t,items:c.map(d)};void 0!==e.tax&&(u.tax=e.tax),void 0!==e.shipping&&(u.shipping=e.shipping),void 0!==e.coupon&&(u.coupon=e.coupon),void 0!==e.affiliation&&(u.affiliation=e.affiliation),r("event","purchase",u),o("track","Purchase",{value:e.value,currency:t,itemCount:c.reduce(function(e,t){return e+(t.quantity||1)},0),products:c.map(function(e){return{id:e.id,name:e.name,category:e.category||""}})}),a("Tracked: Purchase",e)}else n("trackPurchase: order.id is required.")}}}(window,document);

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.