1const trackAnalyticEvent=(eventData,response)=>{if(!response.ok)return response;response.clone().json().then(data=>{window.dataLayer=window.dataLayer||[],eventData={...eventData,language:window.Shopify?.locale??navigator.language,screen_resolution:window.innerWidth+"x"+window.innerHeight},window.dataLayer.push(eventData)})},{fetch:originalFetch}=window;window.fetch=async(...args)=>{let[resource,config]=args,response=await originalFetch(resource,config);if(typeof resource!="string")return response;const body=config?.body&&typeof config.body=="string"?JSON.parse(config.body):{},keys=Object.keys(body);return resource.search("apps/service/shopify/create-customer")>0&&(keys.length===3&&keys.includes("email")&&keys.includes("firstName")&&keys.includes("postcode")&&trackAnalyticEvent({event:"newsletterSubmit",eventCategory:"Newsletter",eventAction:"Submit",eventLabel:"Subscribe"},response),trackAnalyticEvent({event:"customerRegister",eventCategory:"CustomerRegister",eventAction:"Submit",eventLabel:"Customer Register"},response)),typeof body.type<"u"&&body.type==="product_enquiry"&&trackAnalyticEvent({event:"enquirySubmit",eventCategory:"Enquiry",eventAction:"Submit",eventLabel:"Enquiry Submit"},response),response}; 2//# sourceMappingURL=/cdn/shop/t/2/assets/analytic-events-track.js.map?v=150096758811043008171754365043
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.