var IBI=IBI||{};IBI.googleAnalytics=IBI.googleAnalytics||{sendPageView:function(n){var t,i,r;try{t=location.href,i={page:t},n&&ga("set","dimension2",n.toString()),ga("send","pageview",i)}catch(u){r="Error occured attempting to call 'IBI.googleAnalytics.sendPageView'",IBI.errorHandling.handleClientsideError(r,location.href,null,null,u)}},sendTransaction:function(n,t){var e,i,f,u,r,o,s;try{if(t.IsRefreshed.toLowerCase()=="true")return;for(e=t.OrderNumber.toString(),i={},i.revenue=t.Revenue,i.shipping=t.ShippingAmount,i.tax=t.TaxAmount,f=[],u=0;u<t.Items.length;u++)r=t.Items[u],f.push({item_id:r.Sku,item_name:r.Name,affiliation:n,price:r.Price,quantity:r.Quantity});o={currency:"USD",transaction_id:e,value:i.revenue,tax:i.tax,shipping:i.shipping,items:f},gtag("event","purchase",o)}catch(h){s="Error occured attempting to call 'IBI.googleAnalytics.sendTransaction'",IBI.errorHandling.handleClientsideError(s,location.href,null,null,h)}}}