下面是一部分代码,因为代码过长,无法贴出来,只能贴这么多,
该段代码下载地址是:http://www.google-analytics.com/ga.jsvar _gat=new Object({c:"length",lb:"4.3.1",m:"cookie",b:undefined,cb:function(d,a){this.zb=d;this.Nb=a},r:"__utma=",W:"__utmb=",ma:"__utmc=",Ta:"__utmk=",na:"__utmv=",oa:"__utmx=",Sa:"GASO=",X:"__utmz=",lc:"http://www.google-analytics.com/__utm.gif",mc:"https://ssl.google-analytics.com/__utm.gif",Wa:"utmcid=",Ya:"utmcsr=",$a:"utmgclid=",Ua:"utmccn=",Xa:"utmcmd=",Za:"utmctr=",Va:"utmcct=",Hb:false,_gasoDomain:undefined,_gasoCPath:undefined,e:window,a:document,k:navigator,t:function(d){var a=1,c=0,h,
o;if(!_gat.q(d)){a=0;for(h=d[_gat.c]-1;h>=0;h--){o=d.charCodeAt(h);a=(a<<6&268435455)+o+(o<<14);c=a&266338304;a=c!=0?a^c>>21:a}}return a},C:function(d,a,c){var h=_gat,o="-",k,l,s=h.q;if(!s(d)&&!s(a)&&!s(c)){k=h.w(d,a);if(k>-1){l=d.indexOf(c,k);if(l<0)l=d[h.c];o=h.F(d,k+h.w(a,"=")+1,l)}}return o},Ea:function(d){var a=false,c=0,h,o;if(!_gat.q(d)){a=true;for(h=0;h<d[_gat.c];h++){o=d.charAt(h);c+="."==o?1:0;a=a&&c<=1&&(0==h&&"-"==o||_gat.P(".0123456789",o))}}return a},d:function(d,a){var c=encodeURIComponent;
return c instanceof Function?(a?encodeURI(d):c(d)):escape(d)},J:function(d,a){var c=decodeURIComponent,h;d=d.split("+").join(" ");if(c instanceof Function)try{h=a?decodeURI(d):c(d)}catch(o){h=unescape(d)}else h=unescape(d);return h},Db:function(d){return d&&d.hash?_gat.F(d.href,_gat.w(d.href,"#")):""},q:function(d){return _gat.b==d||"-"==d||""==d},Lb:function(d){return d[_gat.c]>0&&_gat.P(" \n\r\t",d)},P:function(d,a){return _gat.w(d,a)>-1},h:function(d,a){d[d[_gat.c]]=a},T:function(d){return d.toLowerCase()},

解决方案 »

  1.   

    只是压缩了var _gat = new Object({
        c: "length",
        lb: "4.3.1",
        m: "cookie",
        b: undefined,
        cb: function(d, a) {
            this.zb = d;
            this.Nb = a
        },
        r: "__utma=",
        W: "__utmb=",
        ma: "__utmc=",
        Ta: "__utmk=",
        na: "__utmv=",
        oa: "__utmx=",
        Sa: "GASO=",
        X: "__utmz=",
        lc: "http://www.google-analytics.com/__utm.gif",
        mc: "https://ssl.google-analytics.com/__utm.gif",
        Wa: "utmcid=",
        Ya: "utmcsr=",
        $a: "utmgclid=",
        Ua: "utmccn=",
        Xa: "utmcmd=",
        Za: "utmctr=",
        Va: "utmcct=",
        Hb: false,
        _gasoDomain: undefined,
        _gasoCPath: undefined,
        e: window,
        a: document,
        k: navigator,
        t: function(d) {
            var a = 1,
            c = 0,
            h, o;
            if (!_gat.q(d)) {
                a = 0;
                for (h = d[_gat.c] - 1; h >= 0; h--) {
                    o = d.charCodeAt(h);
                    a = (a < <6 & 268435455) + o + (o < <14);
                    c = a & 266338304;
                    a = c != 0 ? a ^ c >> 21 : a
                }
            }
            return a
        },
        C: function(d, a, c) {
            var h = _gat,
            o = "-",
            k, l, s = h.q;
            if (!s(d) && !s(a) && !s(c)) {
                k = h.w(d, a);
                if (k > -1) {
                    l = d.indexOf(c, k);
                    if (l < 0) l = d[h.c];
                    o = h.F(d, k + h.w(a, "=") + 1, l)
                }
            }
            return o
        },
        Ea: function(d) {
            var a = false,
            c = 0,
            h, o;
            if (!_gat.q(d)) {
                a = true;
                for (h = 0; h < d[_gat.c]; h++) {
                    o = d.charAt(h);
                    c += "." == o ? 1 : 0;
                    a = a && c <= 1 && (0 == h && "-" == o || _gat.P(".0123456789", o))
                }
            }
            return a
        },
        d: function(d, a) {
            var c = encodeURIComponent;
            return c instanceof Function ? (a ? encodeURI(d) : c(d)) : escape(d)
        },
        J: function(d, a) {
            var c = decodeURIComponent,
            h;
            d = d.split("+").join(" ");
            if (c instanceof Function) try {
                h = a ? decodeURI(d) : c(d)
            } catch(o) {
                h = unescape(d)
            } else h = unescape(d);
            return h
        },
        Db: function(d) {
            return d && d.hash ? _gat.F(d.href, _gat.w(d.href, "#")) : ""
        },
        q: function(d) {
            return _gat.b == d || "-" == d || "" == d
        },
        Lb: function(d) {
            return d[_gat.c] > 0 && _gat.P(" \n\r\t", d)
        },
        P: function(d, a) {
            return _gat.w(d, a) > -1
        },
        h: function(d, a) {
            d[d[_gat.c]] = a
        },
        T: function(d) {
            return d.toLowerCase()
        },
        
      

  2.   

    不止是压缩了,还混淆了。Google的目标就是玩死大家-_-
    LZ把这个代码贴到Eclipse3.5+WebTools里面再Ctrl+Shift+F一下就格式化出来了。JSDT是个很有潜力的JS开发平台呢。
    不过混淆这事就谁都没办法了。试试把开头那一堆东西替换进代码里面
    比如
        c: "length",
    就把代码所有出现c变量引用的地方换成"length"。可能会对你理解这个代码有点点帮助。
      

  3.   

    Google 的代码基本都是这样的,它是混淆之后又压缩了,解决办法楼上已经说了,不过也不能完全搞好,不知道你想搞什么东东,我这里有个仿Google的源码:http://download.csdn.net/source/1102592