1$( document ).ready(function() { 2 3 4 5 //Updated by Shmuel on 7/8/2015 6 //Send the client Id with new GA Universal . https://jira-webpals.com:8443/browse/WCMS-3717 7 8 if ( typeof __gaTracker !== 'undefined' ){ 9 // console.log(__gaTracker); 10 var clientId; 11 __gaTracker( function( tracker ){ //Run when analytics has fully loaded 12 clientId = tracker.get('clientId'); 13 if ( clientId ){ 14 $.ajax({ 15 //url: ajaxurl, 16 url: document.location.origin + '/wp-content/plugins/wcms_frontend/wcms_ajax_handler.php', 17 type: 'POST', 18 data: { 19 'action':'update_client_id', 20 'client_id' : clientId 21 }, 22 success:function(data) { 23 // This outputs the result of the ajax request 24 //console.log(data); 25 }, 26 error: function(errorThrown){ 27 //console.log(errorThrown); 28 } 29 }); 30 } 31 } ); 32 } else if ( typeof ga !== 'undefined' ){ 33 // console.log(ga); 34 var clientId; 35 ga( function( tracker ){ //Run when analytics has fully loaded 36 clientId = tracker.get('clientId'); 37 if ( clientId ){ 38 $.ajax({ 39 //url: ajaxurl, 40 url: document.location.origin + '/wp-content/plugins/wcms_frontend/wcms_ajax_handler.php', 41 type: 'POST', 42 data: { 43 'action':'update_client_id', 44 'client_id' : clientId 45 }, 46 success:function(data) { 47 // This outputs the result of the ajax request 48 //console.log(data); 49 }, 50 error: function(errorThrown){ 51 //console.log(errorThrown); 52 } 53 }); 54 } 55 } ); 56 } else { 57 /** 58 * changed by Yaniv . 59 * suppor 60 */ 61 var utma = readcookie("__utma"); 62 var utmz = readcookie("__utmz"); 63 //utma = utma.match(/^[\d]+\.([\d]+)/)[1]; 64 //utmz = utmz.match(/^[\d]+\.([\d]+)/)[1]; 65 //var clientId = utma+utmz; 66 67 var clientId = '__utma%3D'+utma+'%3B%2B__utmz%3D'+utmz+'%3B'; 68 69 if(utma && utmz) 70 { 71 $.ajax({ 72 //url: ajaxurl, 73 url: document.location.origin + '/wp-content/plugins/wcms_frontend/wcms_ajax_handler.php', //support multi-site for ajax handler url 74 type: 'POST', 75 data: { 76 'action':'update_client_id', 77 'client_id' : clientId 78 }, 79 success:function(data) { 80 // This outputs the result of the ajax request 81 //console.log(data); 82 }, 83 error: function(errorThrown){ 84 //console.log(errorThrown); 85 } 86 }); 87 88 } 89 90 } 91 92}); 93 94function readcookie(name) { var re = new RegExp("(?:^| )" + name + "=([^;]*)", "i"); var matches = document.cookie.match(re); return (matches && matches.length == 2) ? matches[1] : null; }
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.