diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-05-18 07:09:35 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-05-18 07:09:35 +0400 |
commit | 132691dc535c9e3a900e4bc733e3d045ea064b0d (patch) | |
tree | c365c55d39527b90e7c803e82841f4c67d9decbe /piwik.js | |
parent | ab285472fe3bad1e3da12a4bb65cdd99d505babd (diff) |
Fixes #2432
* Last missing piece of "Custom Variables" with a scope "page", the JS API + tests
git-svn-id: http://dev.piwik.org/svn/trunk@4719 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'piwik.js')
-rw-r--r-- | piwik.js | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -14,14 +14,15 @@ return typeof f==="function"?m({"":n},""):n}throw new SyntaxError("JSON.parse")} k()})}else{if(d.attachEvent){d.attachEvent("onreadystatechange",function i(){if(d.readyState==="complete"){d.detachEvent("onreadystatechange",i);k()}});if(d.documentElement.doScroll&&H===H.top){(function i(){if(!h){try{d.documentElement.doScroll("left")}catch(K){setTimeout(i,0);return}k()}}())}}}if((new RegExp("WebKit")).test(j.userAgent)){J=setInterval(function(){if(h||/loaded|complete/.test(d.readyState)){clearInterval(J);k()}},10)}t(H,"load",k,false)}function f(){var i="";try{i=H.top.document.referrer}catch(K){if(H.parent){try{i=H.parent.document.referrer}catch(J){i=""}}}if(i===""){i=d.referrer}return i}function A(i){var K=new RegExp("^([a-z]+):"),J=K.exec(i);return J?J[1]:null}function y(i){var K=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)"),J=K.exec(i);return J?J[1]:i}function p(K,J){var N=new RegExp("^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)"),M=N.exec(K),L=new RegExp("(?:^|&)"+J+"=([^&]*)"),i=M?L.exec(M[1]):0;return i?I(i[1]):""}function s(O,L,K,N,J,M){var i;if(K){i=new Date(); i.setTime(i.getTime()+K)}d.cookie=O+"="+e(L)+(K?";expires="+i.toGMTString():"")+";path="+(N?N:"/")+(J?";domain="+J:"")+(M?";secure":"")}function F(K){var i=new RegExp("(^|;)[ ]*"+K+"=([^;]*)"),J=i.exec(d.cookie);return J?I(J[2]):0}function r(i){return unescape(e(i))}function u(Z){var L=function(W,i){return(W<<i)|(W>>>(32-i))},aa=function(ag){var af="",ae,W;for(ae=7;ae>=0;ae--){W=(ag>>>(ae*4))&15;af+=W.toString(16)}return af},O,ac,ab,K=[],S=1732584193,Q=4023233417,P=2562383102,N=271733878,M=3285377520,Y,X,V,U,T,ad,J,R=[];Z=r(Z);J=Z.length;for(ac=0;ac<J-3;ac+=4){ab=Z.charCodeAt(ac)<<24|Z.charCodeAt(ac+1)<<16|Z.charCodeAt(ac+2)<<8|Z.charCodeAt(ac+3);R.push(ab)}switch(J&3){case 0:ac=2147483648;break;case 1:ac=Z.charCodeAt(J-1)<<24|8388608;break;case 2:ac=Z.charCodeAt(J-2)<<24|Z.charCodeAt(J-1)<<16|32768;break;case 3:ac=Z.charCodeAt(J-3)<<24|Z.charCodeAt(J-2)<<16|Z.charCodeAt(J-1)<<8|128;break}R.push(ac);while((R.length&15)!==14){R.push(0)}R.push(J>>>29);R.push((J<<3)&4294967295);for(O=0;O<R.length; O+=16){for(ac=0;ac<16;ac++){K[ac]=R[O+ac]}for(ac=16;ac<=79;ac++){K[ac]=L(K[ac-3]^K[ac-8]^K[ac-14]^K[ac-16],1)}Y=S;X=Q;V=P;U=N;T=M;for(ac=0;ac<=19;ac++){ad=(L(Y,5)+((X&V)|(~X&U))+T+K[ac]+1518500249)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=20;ac<=39;ac++){ad=(L(Y,5)+(X^V^U)+T+K[ac]+1859775393)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=40;ac<=59;ac++){ad=(L(Y,5)+((X&V)|(X&U)|(V&U))+T+K[ac]+2400959708)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}for(ac=60;ac<=79;ac++){ad=(L(Y,5)+(X^V^U)+T+K[ac]+3395469782)&4294967295;T=U;U=V;V=L(X,30);X=Y;Y=ad}S=(S+Y)&4294967295;Q=(Q+X)&4294967295;P=(P+V)&4294967295;N=(N+U)&4294967295;M=(M+T)&4294967295}ad=aa(S)+aa(Q)+aa(P)+aa(N)+aa(M);return ad.toLowerCase()}function o(K,i,J){if(K==="translate.googleusercontent.com"){if(J===""){J=i}i=p(i,"u");K=y(i)}else{if(K==="cc.bingj.com"||K==="webcache.googleusercontent.com"||K.slice(0,5)==="74.6."){i=d.links[0].href;K=y(i)}}return[K,i,J]}function l(J){var i=J.length;if(J.charAt(--i)==="."){J=J.slice(0,i)}if(J.slice(0,2)==="*."){J=J.slice(1) -}return J}function E(ab,ax){var M=o(d.domain,H.location.href,f()),aP=l(M[0]),a2=M[1],aD=M[2],aB="GET",L=ab||"",aT=ax||"",ao,ag=d.title,ai="7z|aac|ar[cj]|as[fx]|avi|bin|csv|deb|dmg|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|ms[ip]|od[bfgpst]|og[gv]|pdf|phps|png|ppt|qtm?|ra[mr]?|rpm|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wm[av]|wpd||xls|xml|z|zip",az=[aP],P=[],at=[],aa=[],ay=500,Q,ac,R,S,ak=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],af=["pk_kwd","piwik_kwd","utm_term"],a0="_pk_",U,a1,aV,an,Y=63072000000,Z=1800000,ap=15768000000,X=d.location.protocol==="https",O=false,aW=100,ae=5,aJ={},aU={},aG=false,aE=false,aC,au,V,aj=u,aF,am;function aX(a5){var a6;if(R){a6=new RegExp("#.*");return a5.replace(a6,"")}return a5}function aO(a7,a5){var a8=A(a5),a6;if(a8){return a5}if(a5.slice(0,1)==="/"){return A(a7)+"://"+y(a7)+a5}a7=aX(a7);if((a6=a7.indexOf("?"))>=0){a7=a7.slice(0,a6)}if((a6=a7.lastIndexOf("/"))!==a7.length-1){a7=a7.slice(0,a6+1)}return a7+a5 -}function aA(a8){var a6,a5,a7;for(a6=0;a6<az.length;a6++){a5=l(az[a6].toLowerCase());if(a8===a5){return true}if(a5.slice(0,1)==="."){if(a8===a5.slice(1)){return true}a7=a8.length-a5.length;if((a7>0)&&(a8.slice(a7)===a5)){return true}}}return false}function a4(a5){var a6=new Image(1,1);a6.onLoad=function(){};a6.src=L+(L.indexOf("?")<0?"?":"&")+a5}function aL(a5){try{var a7=H.XDomainRequest?new H.XDomainRequest():H.XMLHttpRequest?new H.XMLHttpRequest():H.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;a7.open("POST",L,true);a7.onreadystatechange=function(){if(this.readyState===4&&this.status!==200){a4(a5)}};a7.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");a7.send(a5)}catch(a6){a4(a5)}}function al(a7,a6){var a5=new Date();if(!aV){if(aB==="POST"){aL(a7)}else{a4(a7)}m=a5.getTime()+a6}}function aK(a5){return a0+a5+"."+aT+"."+aF}function N(){var a5=aK("testcookie");if(!b(j.cookieEnabled)){s(a5,"1");return F(a5)==="1"?"1":"0"}return j.cookieEnabled?"1":"0" -}function av(){aF=aj((U||aP)+(a1||"/")).slice(0,4)}function W(){var a6=aK("cvar"),a5=F(a6);if(a5.length){a5=JSON2.parse(a5);if(n(a5)){return a5}}return{}}function K(){if(O===false){O=W()}}function aS(){var a5=new Date();aC=a5.getTime()}function T(a9,a6,a5,a8,a7,ba){s(aK("id"),a9+"."+a6+"."+a5+"."+a8+"."+a7+"."+ba,Y,a1,U,X)}function J(){var a6=new Date(),a5=Math.round(a6.getTime()/1000),a8=F(aK("id")),a7;if(a8){a7=a8.split(".");a7.unshift("0")}else{if(!am){am=aj((j.userAgent||"")+(j.platform||"")+JSON2.stringify(aU)+a5).slice(0,16)}a7=["1",am,a5,0,a5,"",""]}return a7}function i(){var a5=F(aK("ref"));if(a5.length){try{a5=JSON2.parse(a5);if(n(a5)){return a5}}catch(a6){}}return["","",0,""]}function ah(a7,bu,bv,a8){var bs,a6=new Date(),be=Math.round(a6.getTime()/1000),bx,bt,ba,bl,bp,bd,bn,bb,br,a9=1024,by,bh,bo=O,bj=aK("id"),bf=aK("ses"),bg=aK("ref"),bz=aK("cvar"),bm=J(),bi=F(bf),bq=i(),bw=ao||a2,bc,a5;if(aV){s(bj,"",-1,a1,U);s(bf,"",-1,a1,U);s(bz,"",-1,a1,U);s(bg,"",-1,a1,U);return""}bx=bm[0]; -bt=bm[1];bl=bm[2];ba=bm[3];bp=bm[4];bd=bm[5];if(!b(bm[6])){bm[6]=""}bn=bm[6];if(!b(a8)){a8=""}bc=bq[0];a5=bq[1];bb=bq[2];br=bq[3];if(!bi){ba++;bd=bp;if(!an||!bc.length){for(bs in ak){if(Object.prototype.hasOwnProperty.call(ak,bs)){bc=p(bw,ak[bs]);if(bc.length){break}}}for(bs in af){if(Object.prototype.hasOwnProperty.call(af,bs)){a5=p(bw,af[bs]);if(a5.length){break}}}}by=y(aD);bh=br.length?y(br):"";if(by.length&&!aA(by)&&(!an||!bh.length||aA(bh))){br=aD}if(br.length||bc.length){bb=be;bq=[bc,a5,bb,aX(br.slice(0,a9))];s(bg,JSON2.stringify(bq),ap,a1,U,X)}}a7+="&idsite="+aT+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+a6.getHours()+"&m="+a6.getMinutes()+"&s="+a6.getSeconds()+"&url="+e(aX(bw))+(aD.length?"&urlref="+e(aX(aD)):"")+"&_id="+bt+"&_idts="+bl+"&_idvc="+ba+"&_idn="+bx+(bc.length?"&_rcn="+e(bc):"")+(a5.length?"&_rck="+e(a5):"")+"&_refts="+bb+"&_viewts="+bd+(String(bn).length?"&_ects="+bn:"")+(String(br).length?"&_ref="+e(aX(br.slice(0,a9))):"");for(bs in aU){if(Object.prototype.hasOwnProperty.call(aU,bs)){a7+="&"+bs+"="+aU[bs] -}}if(bu){a7+="&data="+e(JSON2.stringify(bu))}else{if(S){a7+="&data="+e(JSON2.stringify(S))}}if(O){var bk=JSON2.stringify(O);if(bk.length>2){a7+="&_cvar="+e(bk)}for(bs in bo){if(Object.prototype.hasOwnProperty.call(bo,bs)){if(O[bs][0]===""||O[bs][1]===""){delete O[bs]}}}s(bz,JSON2.stringify(O),Z,a1,U,X)}T(bt,bl,ba,be,bd,b(a8)&&String(a8).length?a8:bn);s(bf,"*",Z,a1,U,X);a7+=g(bv);return a7}function aN(a8,a7,bc,a9,a5,bf){var ba="idgoal=0",bb,a6=new Date(),bd=[],be;if(String(a8).length){ba+="&ec_id="+e(a8);bb=Math.round(a6.getTime()/1000)}ba+="&revenue="+a7;if(String(bc).length){ba+="&ec_st="+bc}if(String(a9).length){ba+="&ec_tx="+a9}if(String(a5).length){ba+="&ec_sh="+a5}if(String(bf).length){ba+="&ec_dt="+bf}if(aJ){for(be in aJ){if(Object.prototype.hasOwnProperty.call(aJ,be)){if(!b(aJ[be][1])){aJ[be][1]=""}if(!b(aJ[be][2])){aJ[be][2]=""}if(!b(aJ[be][3])||String(aJ[be][3]).length===0){aJ[be][3]=0}if(!b(aJ[be][4])||String(aJ[be][4]).length===0){aJ[be][4]=1}bd.push(aJ[be])}}ba+="&ec_items="+e(JSON2.stringify(bd)) -}ba=ah(ba,S,"ecommerce",bb);al(ba,ay)}function aM(a5,a9,a8,a7,a6,ba){if(String(a5).length&&b(a9)){aN(a5,a9,a8,a7,a6,ba)}}function aZ(a5){if(b(a5)){aN("",a5,"","","","")}}function ar(a8,a9){var a5=new Date(),a7=ah("action_name="+e(a8||ag),a9,"log");al(a7,ay);if(Q&&ac&&!aE){aE=true;t(d,"click",aS);t(d,"mouseup",aS);t(d,"mousedown",aS);t(d,"mousemove",aS);t(d,"mousewheel",aS);t(H,"DOMMouseScroll",aS);t(H,"scroll",aS);t(d,"keypress",aS);t(d,"keydown",aS);t(d,"keyup",aS);t(H,"resize",aS);t(H,"focus",aS);t(H,"blur",aS);aC=a5.getTime();setTimeout(function a6(){var ba=new Date(),bb;if((aC+ac)>ba.getTime()){if(Q<ba.getTime()){bb=ah("ping=1",a9,"ping");al(bb,ay)}setTimeout(a6,ac)}},ac)}}function aw(a5,a8,a7){var a6=ah("idgoal="+a5+(a8?"&revenue="+a8:""),a7,"goal");al(a6,ay)}function aR(a6,a5,a8){var a7=ah(a5+"="+e(aX(a6)),a8,"link");al(a7,ay)}function ad(a7,a6){var a8,a5="(^| )(piwik[_-]"+a6;if(a7){for(a8=0;a8<a7.length;a8++){a5+="|"+a7[a8]}}a5+=")( |$)";return new RegExp(a5)}function aQ(a8,a5,a9){if(!a9){return"link" -}var a7=ad(at,"download"),a6=ad(aa,"link"),ba=new RegExp("\\.("+ai+")([?&#]|$)","i");return a6.test(a8)?"link":(a7.test(a8)||ba.test(a5)?"download":0)}function aI(ba){var a8,a6,a5;while(!!(a8=ba.parentNode)&&((a6=ba.tagName)!=="A"&&a6!=="AREA")){ba=a8}if(b(ba.href)){var bb=ba.hostname||y(ba.href),bc=bb.toLowerCase(),a7=ba.href.replace(bb,bc),a9=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript):","i");if(!a9.test(a7)){a5=aQ(ba.className,a7,aA(bc));if(a5){aR(a7,a5)}}}}function a3(a5){var a6,a7;a5=a5||H.event;a6=a5.which||a5.button;a7=a5.target||a5.srcElement;if(a5.type==="click"){if(a7){aI(a7)}}else{if(a5.type==="mousedown"){if((a6===1||a6===2)&&a7){au=a6;V=a7}else{au=V=null}}else{if(a5.type==="mouseup"){if(a6===au&&a7===V){aI(a7)}au=V=null}}}}function aH(a6,a5){if(a5){t(a6,"mouseup",a3,false);t(a6,"mousedown",a3,false)}else{t(a6,"click",a3,false)}}function aq(a6){if(!aG){aG=true;var a7,a5=ad(P,"ignore"),a8=d.links;if(a8){for(a7=0;a7<a8.length;a7++){if(!a5.test(a8[a7].className)){aH(a8[a7],a6) -}}}}}function aY(){var a5,a6,a7={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(j.mimeTypes&&j.mimeTypes.length){for(a5 in a7){if(Object.prototype.hasOwnProperty.call(a7,a5)){a6=j.mimeTypes[a7[a5]];aU[a5]=(a6&&a6.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&b(j.javaEnabled)&&j.javaEnabled()){aU.java="1"}if(a(H.GearsFactory)){aU.gears="1"}aU.res=v.width+"x"+v.height;aU.cookie=N()}aY();av();return{getVisitorId:function(){return(J())[1]},getVisitorInfo:function(){return J()},getAttributionInfo:function(){return i()},getAttributionCampaignName:function(){return i()[0]},getAttributionCampaignKeyword:function(){return i()[1]},getAttributionReferrerTimestamp:function(){return i()[2]},getAttributionReferrerUrl:function(){return i()[3]},setTrackerUrl:function(a5){L=a5 -},setSiteId:function(a5){aT=a5},setCustomData:function(a5,a6){if(n(a5)){S=a5}else{if(!S){S=[]}S[a5]=a6}},getCustomData:function(){return S},setCustomVariable:function(a6,a5,a7){K();if(a6>0&&a6<=ae){O[a6]=[a5.slice(0,aW),a7.slice(0,aW)]}},getCustomVariable:function(a6){var a5;K();a5=O[a6];if(a5&&a5[0]===""){return}return O[a6]},deleteCustomVariable:function(a5){if(this.getCustomVariable(a5)){this.setCustomVariable(a5,"","")}},setLinkTrackingTimer:function(a5){ay=a5},setDownloadExtensions:function(a5){ai=a5},addDownloadExtensions:function(a5){ai+="|"+a5},setDomains:function(a5){az=q(a5)?[a5]:a5;az.push(aP)},setIgnoreClasses:function(a5){P=q(a5)?[a5]:a5},setRequestMethod:function(a5){aB=a5||"GET"},setReferrerUrl:function(a5){aD=a5},setCustomUrl:function(a5){ao=aO(a2,a5)},setDocumentTitle:function(a5){ag=a5},setDownloadClasses:function(a5){at=q(a5)?[a5]:a5},setLinkClasses:function(a5){aa=q(a5)?[a5]:a5},setCampaignNameKey:function(a5){ak=q(a5)?[a5]:a5},setCampaignKeywordKey:function(a5){af=q(a5)?[a5]:a5 -},discardHashTag:function(a5){R=a5},setCookieNamePrefix:function(a5){a0=a5;O=W()},setCookieDomain:function(a5){U=l(a5);av()},setCookiePath:function(a5){a1=a5;av()},setVisitorCookieTimeout:function(a5){Y=a5*1000},setSessionCookieTimeout:function(a5){Z=a5*1000},setReferralCookieTimeout:function(a5){ap=a5*1000},setConversionAttributionFirstReferrer:function(a5){an=a5},setDoNotTrack:function(a5){aV=a5&&j.doNotTrack},addListener:function(a6,a5){aH(a6,a5)},enableLinkTracking:function(a5){if(h){aq(a5)}else{C.push(function(){aq(a5)})}},setHeartBeatTimer:function(a7,a6){var a5=new Date();Q=a5.getTime()+a7*1000;ac=a6*1000},killFrame:function(){if(H.location!==H.top.location){H.top.location=H.location}},redirectFile:function(a5){if(H.location.protocol==="file:"){H.location=a5}},trackGoal:function(a5,a7,a6){aw(a5,a7,a6)},trackLink:function(a6,a5,a7){aR(a6,a5,a7)},trackPageView:function(a5,a6){ar(a5,a6)},addEcommerceItem:function(a9,a5,a7,a6,a8){if(a9.length){aJ[a9]=[a9,a5,a7,a6,a8]}},trackEcommerceOrder:function(a5,a9,a8,a7,a6,ba){aM(a5,a9,a8,a7,a6,ba) -},trackEcommerceCartUpdate:function(a5){aZ(a5)}}}function c(){return{push:z}}t(H,"beforeunload",B,false);x();G=new E();for(D=0;D<_paq.length;D++){z(_paq[D])}_paq=new c();return{addPlugin:function(i,J){w[i]=J},getTracker:function(i,J){return new E(i,J)},getAsyncTracker:function(){return G}}}()),piwik_track,piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);if(!!(c=a("tracker_pause"))){e.setLinkTrackingTimer(c)}if(!!(c=a("download_extensions"))){e.setDownloadExtensions(c)}if(!!(c=a("hosts_alias"))){e.setDomains(c)}if(!!(c=a("ignore_classes"))){e.setIgnoreClasses(c)}e.trackPageView();if((a("install_tracker"))){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}};
\ No newline at end of file +}return J}function E(ab,ay){var M=o(d.domain,H.location.href,f()),aQ=l(M[0]),a3=M[1],aE=M[2],aC="GET",L=ab||"",aU=ay||"",ao,ag=d.title,ai="7z|aac|ar[cj]|as[fx]|avi|bin|csv|deb|dmg|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|ms[ip]|od[bfgpst]|og[gv]|pdf|phps|png|ppt|qtm?|ra[mr]?|rpm|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wm[av]|wpd||xls|xml|z|zip",aA=[aQ],P=[],at=[],aa=[],az=500,Q,ac,R,S,ak=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],af=["pk_kwd","piwik_kwd","utm_term"],a1="_pk_",U,a2,aW,an,Y=63072000000,Z=1800000,ap=15768000000,X=d.location.protocol==="https",O=false,au={},aX=100,ae=5,aK={},aV={},aH=false,aF=false,aD,av,V,aj=u,aG,am;function aY(a6){var a7;if(R){a7=new RegExp("#.*");return a6.replace(a7,"")}return a6}function aP(a8,a6){var a9=A(a6),a7;if(a9){return a6}if(a6.slice(0,1)==="/"){return A(a8)+"://"+y(a8)+a6}a8=aY(a8);if((a7=a8.indexOf("?"))>=0){a8=a8.slice(0,a7)}if((a7=a8.lastIndexOf("/"))!==a8.length-1){a8=a8.slice(0,a7+1)}return a8+a6 +}function aB(a9){var a7,a6,a8;for(a7=0;a7<aA.length;a7++){a6=l(aA[a7].toLowerCase());if(a9===a6){return true}if(a6.slice(0,1)==="."){if(a9===a6.slice(1)){return true}a8=a9.length-a6.length;if((a8>0)&&(a9.slice(a8)===a6)){return true}}}return false}function a5(a6){var a7=new Image(1,1);a7.onLoad=function(){};a7.src=L+(L.indexOf("?")<0?"?":"&")+a6}function aM(a6){try{var a8=H.XDomainRequest?new H.XDomainRequest():H.XMLHttpRequest?new H.XMLHttpRequest():H.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;a8.open("POST",L,true);a8.onreadystatechange=function(){if(this.readyState===4&&this.status!==200){a5(a6)}};a8.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");a8.send(a6)}catch(a7){a5(a6)}}function al(a8,a7){var a6=new Date();if(!aW){if(aC==="POST"){aM(a8)}else{a5(a8)}m=a6.getTime()+a7}}function aL(a6){return a1+a6+"."+aU+"."+aG}function N(){var a6=aL("testcookie");if(!b(j.cookieEnabled)){s(a6,"1");return F(a6)==="1"?"1":"0"}return j.cookieEnabled?"1":"0" +}function aw(){aG=aj((U||aQ)+(a2||"/")).slice(0,4)}function W(){var a7=aL("cvar"),a6=F(a7);if(a6.length){a6=JSON2.parse(a6);if(n(a6)){return a6}}return{}}function K(){if(O===false){O=W()}}function aT(){var a6=new Date();aD=a6.getTime()}function T(ba,a7,a6,a9,a8,bb){s(aL("id"),ba+"."+a7+"."+a6+"."+a9+"."+a8+"."+bb,Y,a2,U,X)}function J(){var a7=new Date(),a6=Math.round(a7.getTime()/1000),a9=F(aL("id")),a8;if(a9){a8=a9.split(".");a8.unshift("0")}else{if(!am){am=aj((j.userAgent||"")+(j.platform||"")+JSON2.stringify(aV)+a6).slice(0,16)}a8=["1",am,a6,0,a6,"",""]}return a8}function i(){var a6=F(aL("ref"));if(a6.length){try{a6=JSON2.parse(a6);if(n(a6)){return a6}}catch(a7){}}return["","",0,""]}function ah(a8,bw,bx,ba){var bu,a7=new Date(),bg=Math.round(a7.getTime()/1000),bz,bv,bc,bn,br,bf,bp,bd,bt,bb=1024,bA,bj,bq=O,bl=aL("id"),bh=aL("ses"),bi=aL("ref"),bB=aL("cvar"),bo=J(),bk=F(bh),bs=i(),by=ao||a3,be,a6;if(aW){s(bl,"",-1,a2,U);s(bh,"",-1,a2,U);s(bB,"",-1,a2,U);s(bi,"",-1,a2,U);return""}bz=bo[0]; +bv=bo[1];bn=bo[2];bc=bo[3];br=bo[4];bf=bo[5];if(!b(bo[6])){bo[6]=""}bp=bo[6];if(!b(ba)){ba=""}be=bs[0];a6=bs[1];bd=bs[2];bt=bs[3];if(!bk){bc++;bf=br;if(!an||!be.length){for(bu in ak){if(Object.prototype.hasOwnProperty.call(ak,bu)){be=p(by,ak[bu]);if(be.length){break}}}for(bu in af){if(Object.prototype.hasOwnProperty.call(af,bu)){a6=p(by,af[bu]);if(a6.length){break}}}}bA=y(aE);bj=bt.length?y(bt):"";if(bA.length&&!aB(bA)&&(!an||!bj.length||aB(bj))){bt=aE}if(bt.length||be.length){bd=bg;bs=[be,a6,bd,aY(bt.slice(0,bb))];s(bi,JSON2.stringify(bs),ap,a2,U,X)}}a8+="&idsite="+aU+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+a7.getHours()+"&m="+a7.getMinutes()+"&s="+a7.getSeconds()+"&url="+e(aY(by))+(aE.length?"&urlref="+e(aY(aE)):"")+"&_id="+bv+"&_idts="+bn+"&_idvc="+bc+"&_idn="+bz+(be.length?"&_rcn="+e(be):"")+(a6.length?"&_rck="+e(a6):"")+"&_refts="+bd+"&_viewts="+bf+(String(bp).length?"&_ects="+bp:"")+(String(bt).length?"&_ref="+e(aY(bt.slice(0,bb))):"");var a9=JSON2.stringify(au);if(a9.length>2){a8+="&cvar="+e(a9) +}for(bu in aV){if(Object.prototype.hasOwnProperty.call(aV,bu)){a8+="&"+bu+"="+aV[bu]}}if(bw){a8+="&data="+e(JSON2.stringify(bw))}else{if(S){a8+="&data="+e(JSON2.stringify(S))}}if(O){var bm=JSON2.stringify(O);if(bm.length>2){a8+="&_cvar="+e(bm)}for(bu in bq){if(Object.prototype.hasOwnProperty.call(bq,bu)){if(O[bu][0]===""||O[bu][1]===""){delete O[bu]}}}s(bB,JSON2.stringify(O),Z,a2,U,X)}T(bv,bn,bc,bg,bf,b(ba)&&String(ba).length?ba:bp);s(bh,"*",Z,a2,U,X);a8+=g(bx);return a8}function aO(a9,a8,bd,ba,a6,bg){var bb="idgoal=0",bc,a7=new Date(),be=[],bf;if(String(a9).length){bb+="&ec_id="+e(a9);bc=Math.round(a7.getTime()/1000)}bb+="&revenue="+a8;if(String(bd).length){bb+="&ec_st="+bd}if(String(ba).length){bb+="&ec_tx="+ba}if(String(a6).length){bb+="&ec_sh="+a6}if(String(bg).length){bb+="&ec_dt="+bg}if(aK){for(bf in aK){if(Object.prototype.hasOwnProperty.call(aK,bf)){if(!b(aK[bf][1])){aK[bf][1]=""}if(!b(aK[bf][2])){aK[bf][2]=""}if(!b(aK[bf][3])||String(aK[bf][3]).length===0){aK[bf][3]=0}if(!b(aK[bf][4])||String(aK[bf][4]).length===0){aK[bf][4]=1 +}be.push(aK[bf])}}bb+="&ec_items="+e(JSON2.stringify(be))}bb=ah(bb,S,"ecommerce",bc);al(bb,az)}function aN(a6,ba,a9,a8,a7,bb){if(String(a6).length&&b(ba)){aO(a6,ba,a9,a8,a7,bb)}}function a0(a6){if(b(a6)){aO("",a6,"","","","")}}function ar(a9,ba){var a6=new Date(),a8=ah("action_name="+e(a9||ag),ba,"log");al(a8,az);if(Q&&ac&&!aF){aF=true;t(d,"click",aT);t(d,"mouseup",aT);t(d,"mousedown",aT);t(d,"mousemove",aT);t(d,"mousewheel",aT);t(H,"DOMMouseScroll",aT);t(H,"scroll",aT);t(d,"keypress",aT);t(d,"keydown",aT);t(d,"keyup",aT);t(H,"resize",aT);t(H,"focus",aT);t(H,"blur",aT);aD=a6.getTime();setTimeout(function a7(){var bb=new Date(),bc;if((aD+ac)>bb.getTime()){if(Q<bb.getTime()){bc=ah("ping=1",ba,"ping");al(bc,az)}setTimeout(a7,ac)}},ac)}}function ax(a6,a9,a8){var a7=ah("idgoal="+a6+(a9?"&revenue="+a9:""),a8,"goal");al(a7,az)}function aS(a7,a6,a9){var a8=ah(a6+"="+e(aY(a7)),a9,"link");al(a8,az)}function ad(a8,a7){var a9,a6="(^| )(piwik[_-]"+a7;if(a8){for(a9=0;a9<a8.length;a9++){a6+="|"+a8[a9] +}}a6+=")( |$)";return new RegExp(a6)}function aR(a9,a6,ba){if(!ba){return"link"}var a8=ad(at,"download"),a7=ad(aa,"link"),bb=new RegExp("\\.("+ai+")([?&#]|$)","i");return a7.test(a9)?"link":(a8.test(a9)||bb.test(a6)?"download":0)}function aJ(bb){var a9,a7,a6;while(!!(a9=bb.parentNode)&&((a7=bb.tagName)!=="A"&&a7!=="AREA")){bb=a9}if(b(bb.href)){var bc=bb.hostname||y(bb.href),bd=bc.toLowerCase(),a8=bb.href.replace(bc,bd),ba=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript):","i");if(!ba.test(a8)){a6=aR(bb.className,a8,aB(bd));if(a6){aS(a8,a6)}}}}function a4(a6){var a7,a8;a6=a6||H.event;a7=a6.which||a6.button;a8=a6.target||a6.srcElement;if(a6.type==="click"){if(a8){aJ(a8)}}else{if(a6.type==="mousedown"){if((a7===1||a7===2)&&a8){av=a7;V=a8}else{av=V=null}}else{if(a6.type==="mouseup"){if(a7===av&&a8===V){aJ(a8)}av=V=null}}}}function aI(a7,a6){if(a6){t(a7,"mouseup",a4,false);t(a7,"mousedown",a4,false)}else{t(a7,"click",a4,false)}}function aq(a7){if(!aH){aH=true;var a8,a6=ad(P,"ignore"),a9=d.links; +if(a9){for(a8=0;a8<a9.length;a8++){if(!a6.test(a9[a8].className)){aI(a9[a8],a7)}}}}}function aZ(){var a6,a7,a8={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"};if(j.mimeTypes&&j.mimeTypes.length){for(a6 in a8){if(Object.prototype.hasOwnProperty.call(a8,a6)){a7=j.mimeTypes[a8[a6]];aV[a6]=(a7&&a7.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&b(j.javaEnabled)&&j.javaEnabled()){aV.java="1"}if(a(H.GearsFactory)){aV.gears="1"}aV.res=v.width+"x"+v.height;aV.cookie=N()}aZ();aw();return{getVisitorId:function(){return(J())[1]},getVisitorInfo:function(){return J()},getAttributionInfo:function(){return i()},getAttributionCampaignName:function(){return i()[0]},getAttributionCampaignKeyword:function(){return i()[1]},getAttributionReferrerTimestamp:function(){return i()[2] +},getAttributionReferrerUrl:function(){return i()[3]},setTrackerUrl:function(a6){L=a6},setSiteId:function(a6){aU=a6},setCustomData:function(a6,a7){if(n(a6)){S=a6}else{if(!S){S=[]}S[a6]=a7}},getCustomData:function(){return S},setCustomVariable:function(a7,a6,ba,a8){var a9;if(!b(a8)){a8="visit"}if(a7>0&&a7<=ae){a9=[a6.slice(0,aX),ba.slice(0,aX)];if(a8==="visit"||a8===2){K();O[a7]=a9}else{if(a8==="page"||a8===3){au[a7]=a9}}}},getCustomVariable:function(a7,a8){var a6;if(!b(a8)){a8="visit"}if(a8==="page"||a8===3){a6=au[a7]}else{if(a8==="visit"||a8===2){K();a6=O[a7]}}if(!b(a6)||(a6&&a6[0]==="")){return false}return a6},deleteCustomVariable:function(a6,a7){if(this.getCustomVariable(a6,a7)){this.setCustomVariable(a6,"","",a7)}},setLinkTrackingTimer:function(a6){az=a6},setDownloadExtensions:function(a6){ai=a6},addDownloadExtensions:function(a6){ai+="|"+a6},setDomains:function(a6){aA=q(a6)?[a6]:a6;aA.push(aQ)},setIgnoreClasses:function(a6){P=q(a6)?[a6]:a6},setRequestMethod:function(a6){aC=a6||"GET" +},setReferrerUrl:function(a6){aE=a6},setCustomUrl:function(a6){ao=aP(a3,a6)},setDocumentTitle:function(a6){ag=a6},setDownloadClasses:function(a6){at=q(a6)?[a6]:a6},setLinkClasses:function(a6){aa=q(a6)?[a6]:a6},setCampaignNameKey:function(a6){ak=q(a6)?[a6]:a6},setCampaignKeywordKey:function(a6){af=q(a6)?[a6]:a6},discardHashTag:function(a6){R=a6},setCookieNamePrefix:function(a6){a1=a6;O=W()},setCookieDomain:function(a6){U=l(a6);aw()},setCookiePath:function(a6){a2=a6;aw()},setVisitorCookieTimeout:function(a6){Y=a6*1000},setSessionCookieTimeout:function(a6){Z=a6*1000},setReferralCookieTimeout:function(a6){ap=a6*1000},setConversionAttributionFirstReferrer:function(a6){an=a6},setDoNotTrack:function(a6){aW=a6&&j.doNotTrack},addListener:function(a7,a6){aI(a7,a6)},enableLinkTracking:function(a6){if(h){aq(a6)}else{C.push(function(){aq(a6)})}},setHeartBeatTimer:function(a8,a7){var a6=new Date();Q=a6.getTime()+a8*1000;ac=a7*1000},killFrame:function(){if(H.location!==H.top.location){H.top.location=H.location +}},redirectFile:function(a6){if(H.location.protocol==="file:"){H.location=a6}},trackGoal:function(a6,a8,a7){ax(a6,a8,a7)},trackLink:function(a7,a6,a8){aS(a7,a6,a8)},trackPageView:function(a6,a7){ar(a6,a7)},addEcommerceItem:function(ba,a6,a8,a7,a9){if(ba.length){aK[ba]=[ba,a6,a8,a7,a9]}},trackEcommerceOrder:function(a6,ba,a9,a8,a7,bb){aN(a6,ba,a9,a8,a7,bb)},trackEcommerceCartUpdate:function(a6){a0(a6)}}}function c(){return{push:z}}t(H,"beforeunload",B,false);x();G=new E();for(D=0;D<_paq.length;D++){z(_paq[D])}_paq=new c();return{addPlugin:function(i,J){w[i]=J},getTracker:function(i,J){return new E(i,J)},getAsyncTracker:function(){return G}}}()),piwik_track,piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);if(!!(c=a("tracker_pause"))){e.setLinkTrackingTimer(c)}if(!!(c=a("download_extensions"))){e.setDownloadExtensions(c)}if(!!(c=a("hosts_alias"))){e.setDomains(c)}if(!!(c=a("ignore_classes"))){e.setIgnoreClasses(c) +}e.trackPageView();if((a("install_tracker"))){piwik_track=function(i,k,j,h){e.setSiteId(k);e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}};
\ No newline at end of file |