1//parse url 2function getParameterByName(name) { 3 name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); 4 var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), 5 results = regex.exec(location.search); 6 return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); 7} 8 9function getMainDomain() { 10 var matchArr = window.location.host.match(/[^\.]*\.[^\.]*$/); 11 if(matchArr){ 12 return ("."+matchArr[0]); 13 }else{ 14 return window.location.host; 15 } 16} 17 18var cDomain = getMainDomain(); 19 20var utm_source = getParameterByName('utm_source'); 21var utm_medium = getParameterByName('utm_medium'); 22var utm_campaign = getParameterByName('utm_campaign'); 23 24if (utm_source.length > 0) { 25 Cookies.set('utm_source', utm_source, { expires: 1, domain: cDomain }); 26} 27if (utm_medium.length > 0) { 28 Cookies.set('utm_medium', utm_medium, { expires: 1 , domain: cDomain}); 29} 30if (utm_campaign.length > 0) { 31 Cookies.set('utm_campaign', utm_campaign, { expires: 1 , domain: cDomain}); 32}
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.