!function e(o,t,n){function r(a,c){if(!t[a]){if(!o[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(i)return i(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var s=t[a]={exports:{}};o[a][0].call(s.exports,function(e){var t=o[a][1][e];return r(t?t:e)},s,s.exports,e,o,t,n)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a1){if(i=e({path:"/"},n.defaults,i),"number"==typeof i.expires){var c=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*i.expires),i.expires=c}i.expires=i.expires?i.expires.toUTCString():"";try{a=JSON.stringify(r),/^[\{\[]/.test(a)&&(r=a)}catch(l){}r=t.write?t.write(r,o):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),o=encodeURIComponent(String(o)),o=o.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),o=o.replace(/[\(\)]/g,escape);var d="";for(var s in i)i[s]&&(d+="; "+s,i[s]!==!0&&(d+="="+i[s]));return document.cookie=o+"="+r+d}o||(a={});for(var m=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,p=0;p1&&void 0!==arguments[1]?arguments[1]:location.protocol,c=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"www.loopanalytics.com",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.webProtocol=a,this.beaconUrl=l,this.websiteId=e,d.noReferer=d.noReferer||"",d.noReferer===!0&&(this.altReferer=window.location.href),this.pageview=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=""+c.webProtocol+(""+(c.webProtocol.indexOf(":")>-1?"//":"://"))+(c.beaconUrl+"/beacon/")+("?_wid="+c.websiteId)+("&_referer_url="+encodeURIComponent(document.referrer))+"&_action_name=pageview&_type=pageview&";if(n.get("_trackatronId")||window.location.search.indexOf("_trackatronId")!==-1||window.location.hash.indexOf("_trackatronId")!==-1){if(window.location.search.indexOf("_trackatronId")>-1)for(var a=window.location.search.substring(1),l=a.split("&"),d=0;d-1)for(var m=window.location.hash.substring(1),u=m.split("&"),p=0;p0){for(var _=0;_-1?"//":"://"))+(l.beaconUrl+"/beacon/?")+("_wid="+l.websiteId)+("&_referer_url="+encodeURIComponent(document.referrer))+("&_action_name="+l.actionName)+"&_type=formSubmission&";if(!n.get("_trackatronId")){var m=Math.random().toString(36).substr(2,9);t(m)}if(r(),n.get("_trackatronId")&&(s=s+"_cookie_id="+n.get("_trackatronId")+"&"),s+=i(c.altReferer),l.useCustomValue){if("string"==typeof l.requiredFields&&""!==l.requiredFields)for(var u=l.requiredFields.split(","),p=0;p-1?"//":"://"))+(e.beaconUrl+"/beacon/")+("?_wid="+c.websiteId)+("&_referer_url="+encodeURIComponent(document.referrer))+"&_type=event&_action_name=event&_event_category="+encodeURIComponent(e.category)+("&_event_action="+encodeURIComponent(e.action))+("&_event_label="+encodeURIComponent(e.label)+"&");if(!n.get("_trackatronId")){var a=Math.random().toString(36).substr(2,9);t(a)}r(),n.get("_trackatronId")&&(o=o+"_cookie_id="+n.get("_trackatronId")+"&"),o+=i(c.altReferer);var l=new Image(1,1);l.src=o}},this.identify=function(e){if(e.protocol=e.webProtocol||c.webProtocol,e.beaconUrl=e.beaconUrl||c.beaconUrl,e.websiteId=e.websiteId||c.websiteId,e.name=e.name||"",e.email=e.email||"",e.company=e.company||"",""!==e.name||""!==e.email||""!==e.company){var o=""+e.protocol+(""+(e.protocol.indexOf(":")>-1?"//":"://"))+(e.beaconUrl+"/beacon/?")+("_wid="+e.websiteId)+("&_referer_url="+encodeURIComponent(document.referrer))+"&_action_name=identify&_type=identify"+(""!==e.name?"&_visitorName="+encodeURIComponent(e.name):"")+(""!==e.email?"&_visitorEmail="+encodeURIComponent(e.email):"")+(""!==e.company?"&_visitorCompany="+encodeURIComponent(e.company)+"&":"&");if(!n.get("_trackatronId")){var a=Math.random().toString(36).substr(2,9);t(a)}r(),n.get("_trackatronId")&&(o=o+"_cookie_id="+n.get("_trackatronId")+"&"),o+=i(c.altReferer);var l=new Image(1,1);l.src=o}},this.transaction=function(e){if(e.protocol=e.webProtocol||c.webProtocol,e.beaconUrl=e.beaconUrl||c.beaconUrl,e.websiteId=e.websiteId||c.websiteId,e.visitorName=e.visitorName||"",e.visitorCompany=e.visitorCompany||"",e.visitorEmail=e.visitorEmail||"",e.id=void 0===e.id?"":e.id,e.revenue=void 0===e.revenue?"":e.revenue,e.shipping=e.shipping||"0",e.tax=e.tax||"0",e.currency=e.currency||"USD",e.products=e.products||[],e.affiliation=e.affiliation||"",""!==e.id&&""!==e.revenue){for(var o=""+e.protocol+(""+(e.protocol.indexOf(":")>-1?"//":"://"))+(e.beaconUrl+"/beacon/?")+("_wid="+e.websiteId)+("&_referer_url="+encodeURIComponent(document.referrer))+("&_visitorName="+encodeURIComponent(e.visitorName))+("&_visitorCompany="+encodeURIComponent(e.visitorCompany))+("&_visitorEmail="+encodeURIComponent(e.visitorEmail))+"&_action_name=transaction&_type=transaction&_transaction_id="+encodeURIComponent(e.id)+("&_transaction_revenue="+encodeURIComponent(e.revenue))+("&_transaction_shipping="+encodeURIComponent(e.shipping))+("&_transaction_tax="+encodeURIComponent(e.tax))+("&_transaction_currency="+encodeURIComponent(e.currency))+("&_transaction_affiliation="+encodeURIComponent(e.affiliation)+"&"),a=0;a