1(function(){window.dataLayer||(window.dataLayer=[]);function getShopCurrency(){try{if(Shopify&&Shopify.currency&&Shopify.currency.active)return Shopify.currency.active}catch(e){}var meta=document.querySelector('meta[name="shop-currency"]');return meta&&meta.content?meta.content:Shopify&&Shopify.currency&&Shopify.currency.code||"USD"}function nowIso(){return new Date().toISOString()}function newEventId(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)}function pushEvent(name,params){try{window.dataLayer.push(Object.assign({event:name,event_id:newEventId(),event_time:nowIso(),event_state:"OTHER"},params||{}))}catch(e){}}function mapGa4ItemFromLineItem(lineItem,currency){var variantTitle=lineItem.variant_title||"",qty=Number(lineItem.quantity||0),price=Number(lineItem.final_line_price||lineItem.line_price||0)/100,unitPrice=qty?price/qty:Number(lineItem.final_price||lineItem.price||0)/100;return{item_id:String(lineItem.sku||lineItem.variant_id||lineItem.id||""),item_name:String(lineItem.product_title||lineItem.title||""),affiliation:"Online Store",currency:currency,item_brand:lineItem.vendor||"",item_variant:variantTitle,price:Number(unitPrice.toFixed(2)),quantity:qty,item_category:lineItem.product_type||"",item_list_name:"Shopping Cart",item_list_id:"cart",index:1}}function fetchCart(){return fetch("/cart.js",{credentials:"same-origin"}).then(function(r){return r.json()})}function buildItemsFromCart(cartJson,currency){return!cartJson||!cartJson.items?[]:cartJson.items.map(function(li){return mapGa4ItemFromLineItem(li,currency)})}function computeCartValue(cartJson){if(!cartJson)return 0;var total=Number(cartJson.total_price||0)/100;return Number(total.toFixed(2))}function pushViewCart(cartJson,trigger){var currency=getShopCurrency(),items=buildItemsFromCart(cartJson,currency),value=computeCartValue(cartJson);pushEvent("view_cart_shopify",{event_state:trigger||"OTHER",currency:currency,value:value,items:items})}function onCartVisible(trigger){fetchCart().then(function(cart){pushViewCart(cart,trigger)})}document.body&&/template-cart/.test(document.body.className)&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){onCartVisible("CART_PAGE")}):onCartVisible("CART_PAGE")),window.addEventListener("cart_drawer_opened",function(){onCartVisible("CART_DRAWER")})})(); 2//# sourceMappingURL=/cdn/shop/t/68/assets/instant-analytics.js.map?v=94964997955675604801759480315
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.