Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need explanation about this js code

    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


    Code:
    (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));
    Last edited by VIPStephan; 01-13-2013 at 09:33 PM. Reason: added code BB tags

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,189
    Thanks
    80
    Thanked 4,560 Times in 4,524 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •