1"use strict"; 2function setStoreLog() { 3 var today = new Date(); 4 var dd = today.getDate(); 5 var mm = today.getMonth() + 1; 6 var yyyy = today.getFullYear(); 7 if (dd < 10) dd = '0' + dd; 8 if (mm < 10) mm = '0' + mm; 9 10 if (ReferalUrl == '') setCookie(cookieName + "-preid", '', -1); 11 var UserInfo = []; 12 if (getStorageWithExpiry(cookieName + "-customer") !== null && getStorageWithExpiry(cookieName + "-customer") !== '') UserInfo = JSON.parse(getStorageWithExpiry(cookieName + "-customer")); 13 var dataCaptured = {}; 14 dataCaptured.VendorID = VendorID; 15 dataCaptured.StoreCatalogID = ID; 16 dataCaptured.ProductID = ItemID; 17 dataCaptured.Page = PageTitle; 18 dataCaptured.VisitedOn = mm + '-' + dd + '-' + yyyy; 19 dataCaptured.VisitedOnHour = today.getHours(); 20 dataCaptured.DeviceType = DeviceType; 21 dataCaptured.DeviceWidth = DeviceWidth; 22 dataCaptured.DeviceHeight = DeviceHeight; 23 dataCaptured.LoggedInUser = UserInfo.length > 0 ? UserInfo.Email : ""; 24 dataCaptured.SessionID = SessionID; 25 dataCaptured.ReferalURL = ReferalUrl; 26 dataCaptured.ip_address = visitor.ip_address; 27 dataCaptured.continent = visitor.continent; 28 dataCaptured.continent_code = visitor.continent_code; 29 dataCaptured.country = visitor.country; 30 dataCaptured.country_code = visitor.country_code; 31 dataCaptured.region = visitor.region; 32 dataCaptured.region_iso_code = visitor.region_iso_code; 33 dataCaptured.city = visitor.city; 34 dataCaptured.postal_code = visitor.postal_code; 35 dataCaptured.longitude = visitor.longitude; 36 dataCaptured.latitude = visitor.latitude; 37 dataCaptured.security_is_vpn = visitor.security.is_vpn; 38 dataCaptured.timezone_name = visitor.timezone.name; 39 dataCaptured.timezone_abbreviation = visitor.timezone.abbreviation; 40 dataCaptured.timezone_gmt_offset = visitor.timezone.gmt_offset; 41 dataCaptured.currency_code = visitor.currency.currency_code; 42 dataCaptured.connection_type = visitor.connection.connection_type; 43 dataCaptured.LoadTimeMilliseconds = 0;//LoadTimeMilliseconds; 44 $.ajax({
45 url: '/Account/StoreLog', 46 type: 'POST', 47 data: dataCaptured, 48 success: function (returnData) { 49 if (returnData.Result === "OK") setCookie(cookieName + "-preid", returnData.OldID, 1); 50 }, 51 error: function () { } 52 }); 53}
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.