PDA

View Full Version : I need explanation about this js code



camillo
Jan 13th, 2013, 08:18 PM
Hi,

I'm not a web master. Please i need to know what means this code or more simple what it will says! As I'm not into programming i need really a basic explanation!

Thank to all for your help. Camillo



(function(window, ta, undefined){
try {
var _gaq = window._gaq = window._gaq || []
, pageDataStack = ta.analytics.pageData = ta.analytics.pageData || []
, pageData
;
_gaq.push(['_setAccount', 'UA-30198665-1']);
_gaq.push(['_addIgnoredRef', 'tripadvisor']);
_gaq.push(['_addIgnoredRef', 'daodao']);
_gaq.push(['_setCustomVar', 2, 'Member', '-', 3]);
_gaq.push(['_setCustomVar', 9, 'EntryDetail', 'CityCenter Bed and Breakfast Amsterdam-1378700', 3]);
_gaq.push(['_setCustomVar', 3, 'EntryGeo', 'Amsterdam-188590', 3]);
_gaq.push(['_setCustomVar', 4, 'EntryCountry', 'The Netherlands-188553', 3]);
_gaq.push(['_setCustomVar', 5, 'EntryServlet', 'Hotel_Review', 3]);
_gaq.push(['_setCustomVar', 6, 'Pool', 'T', 3]);
_gaq.push(['_setCustomVar', 7, 'Slice', '1023', 3]);
_gaq.push(['_setCustomVar', 18, 'MCID', 'Widgets - Badges-11863', 3]);
_gaq.push(['_setCustomVar', 21, 'PageType', 'Desktop Page', 3]);
_gaq.push(['_setCustomVar', 22, 'DeviceType', 'Desktop', 3]);
_gaq.push(['_setCustomVar', 23, 'IPGeo', 'Nieuw Amsterdam-1087509', 3]);
_gaq.push(['_setCustomVar', 24, 'ProductType', 'Browser', 3]);
_gaq.push(['_setCustomVar', 48, 'WebServer', 'web52b', 3]);
pageData = ta.analytics._JSON_parse('{\"cv\":[[\"_deleteCustomVar\",1],[\"_setCustomVar\",13,\"Geo\",\"Amsterdam-188590\",3],[\"_setCustomVar\",12,\"Country\",\"The Netherlands-188553\",3],[\"_setCustomVar\",25,\"Continent\",\"Europe-4\",3],[\"_setCustomVar\",10,\"PageAction\",\"PropertyType2\",3],[\"_setCustomVar\",20,\"PP\",\"-279-251-38-253-171-115-280-180-274-\",3],[\"_deleteCustomVar\",8],[\"_deleteCustomVar\",19],[\"_deleteCustomVar\",11],[\"_deleteCustomVar\",14]],\"url\":\"/Hotels\"}');
pageDataStack.push(pageData);
if (ta.keep) {
ta.keep("partials.pageProperties", "279-251-38-253-171-115-280-180-274");
}
if (ta.store) {
ta.store("gaMemberState", "-");
}
for (var i = 0, l = pageData.cv.length; i < l; i++) {
_gaq.push(pageData.cv[i]);
}
_gaq.push(['_set', 'page', pageData.url]);
_gaq.push(['_trackPageview']);
if (ta && ta.queueForLoad) {
ta.queueForLoad(ta.analytics._insertGAScriptElement, 10, 'global_ga.vm_loadGA');
}
ta.analytics.google_analytics_onload = true;
}
catch (e) {
if(ta && ta.util && ta.util.error && ta.util.error.record) {
ta.util.error.record(e, 'global_ga.vm');
}
}
}(window, ta));

Old Pedant
Jan 13th, 2013, 10:20 PM
That is all part of Google Analyitics code. It is code that allows Google to give you statistics about hits on your web site. If you don't use Google to get statistics, you can remove it all.