diff options
Diffstat (limited to 'piwik.js')
-rw-r--r-- | piwik.js | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -5,11 +5,11 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later * @version $Id$ */ -var Piwik,piwik_log,piwik_track;if(!this.Piwik){Piwik=(function(){var b,f={},d=document,c=navigator,g=screen,l=window,i=l.location.hostname,h=false,o=[];function n(q){return typeof q!=="undefined"}function e(t,s,r,q){if(t.addEventListener){t.addEventListener(s,r,q);return true}else{if(t.attachEvent){return t.attachEvent("on"+s,r)}}t["on"+s]=r}function k(r,u){var q="",t,s;for(t in f){s=f[t][r];if(typeof s==="function"){q+=s(u)}}return q}function m(q){if(n(b)){var r;do{r=new Date()}while(r.getTime()<b)}k("unload")}function p(r){if(!h){h=true;k("load");for(var q=0;q<o.length;q++){o[q]()}}return true}function a(){if(d.addEventListener){e(d,"DOMContentLoaded",function(){d.removeEventListener("DOMContentLoaded",arguments.callee,false);p()})}else{if(d.attachEvent){d.attachEvent("onreadystatechange",function(){if(d.readyState==="complete"){d.detachEvent("onreadystatechange",arguments.callee); -p()}});if(d.documentElement.doScroll&&l==l.top){(function(){if(h){return}try{d.documentElement.doScroll("left")}catch(q){setTimeout(arguments.callee,0);return}p()}())}}}e(l,"load",p,false)}function j(Q,P){var D=Q||"",aa=P||"",V,Z=d.title,G="7z|aac|arc|arj|asf|asx|avi|bin|csv|deb|dmg|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|rpm|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wma|wmv|wpd||xls|xml|z|zip",R=[i],u=[],S=[],T=[],C=500,O,y="0",w,B={pdf:["pdf","application/pdf","0"],quicktime:["qt","video/quicktime","0"],realplayer:["realp","audio/x-pn-realaudio-plugin","0"],wma:["wma","application/x-mplayer2","0"],director:["dir","application/x-director","0"],flash:["fla","application/x-shockwave-flash","0"],java:["java","application/x-java-vm","0"],gears:["gears","application/x-googlegears","0"],silverlight:["ag","application/x-silverlight","0"]},K=false,s=l.encodeURIComponent||escape,X=l.decodeURIComponent||unescape,ab=function(ae){var ah=new RegExp('[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',"g"),af={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}; -function ac(ai){ah.lastIndex=0;return ah.test(ai)?'"'+ai.replace(ah,function(aj){var ak=af[aj];return typeof ak==="string"?ak:"\\u"+("0000"+aj.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+ai+'"'}function ad(ai){return ai<10?"0"+ai:ai}function ag(an,am){var al,ak,aj,ai,ao=am[an];if(ao===null){return"null"}if(ao&&typeof ao==="object"&&typeof ao.toJSON==="function"){ao=ao.toJSON(an)}switch(typeof ao){case"string":return ac(ao);case"number":return isFinite(ao)?String(ao):"null";case"boolean":case"null":return String(ao);case"object":ai=[];if(ao instanceof Array){for(al=0;al<ao.length;al++){ai[al]=ag(al,ao)||"null"}aj=ai.length===0?"[]":"["+ai.join(",")+"]";return aj}if(ao instanceof Date){return ac(ao.getUTCFullYear()+"-"+ad(ao.getUTCMonth()+1)+"-"+ad(ao.getUTCDate())+"T"+ad(ao.getUTCHours())+":"+ad(ao.getUTCMinutes())+":"+ad(ao.getUTCSeconds())+"Z")}for(ak in ao){aj=ag(ak,ao);if(aj){ai[ai.length]=ac(ak)+":"+aj}}aj=ai.length===0?"{}":"{"+ai.join(",")+"}";return aj}}return ag("",{"":ae})},v={}; -function z(ai,af,ad,ah,ae,ag){var ac;if(ad){ac=new Date();ac.setTime(ac.getTime()+ad*86400000)}d.cookie=ai+"="+s(af)+(ad?";expires="+ac.toGMTString():"")+";path="+(ah?ah:"/")+(ae?";domain="+ae:"")+(ag?";secure":"")}function t(ae){var ac=new RegExp("(^|;)[ ]*"+ae+"=([^;]*)"),ad=ac.exec(d.cookie);return ad?X(ad[2]):0}function q(ae,ad){var ac=new Date(),af=new Image(1,1);b=ac.getTime()+ad;af.onLoad=function(){};af.src=ae}function A(){var ac,ad;if(typeof c.javaEnabled!=="undefined"&&c.javaEnabled()){B.java[2]="1"}if(typeof l.GearsFactory==="function"){B.gears[2]="1"}if(c.mimeTypes&&c.mimeTypes.length){for(ac in B){ad=c.mimeTypes[B[ac][1]];if(ad&&ad.enabledPlugin){B[ac][2]="1"}}}}function I(){var ac="";try{ac=top.document.referrer}catch(ae){if(parent){try{ac=parent.document.referrer}catch(ad){ac=""}}}if(ac===""){ac=d.referrer}return ac}function N(){var ac="_pk_testcookie";if(!n(c.cookieEnabled)){z(ac,"1");return t(ac)=="1"?"1":"0"}return c.cookieEnabled?"1":"0"}function H(){var ad,ac,ae;ac=new Date(); -ae="idsite="+aa+"&rec=1&url="+s(n(V)?V:d.location.href)+"&res="+g.width+"x"+g.height+"&h="+ac.getHours()+"&m="+ac.getMinutes()+"&s="+ac.getSeconds()+"&cookie="+y+"&urlref="+s(w)+"&rand="+Math.random();for(ad in B){ae+="&"+B[ad][0]+"="+B[ad][2]}ae=D+"?"+ae;return ae}function r(ad){var ac=H();ac+="&action_name="+s(n(ad)?ad:Z);if(n(O)){ac+="&data="+s(ab(O))}ac+=k("log");q(ac,C)}function W(ac,af,ae){var ad=H();ad+="&idgoal="+ac;if(n(af)&&af!==null){ad+="&revenue="+af}if(n(ae)){if(ae!==null){ad+="&data="+s(ab(ae))}}else{if(n(O)){ad+="&data="+s(ab(O))}}ad+=k("goal");q(ad,C)}function F(ad,ac,af){var ae;ae="idsite="+aa+"&rec=1&"+ac+"="+s(ad)+"&rand="+Math.random()+"&redirect=0";if(n(af)){if(af!==null){ae+="&data="+s(ab(af))}}else{if(n(O)){ae+="&data="+s(ab(O))}}ae+=k("click");ae=D+"?"+ae;q(ae,C)}function L(af){var ad,ac,ae;for(ad=0;ad<R.length;ad++){ac=R[ad];if(af==ac){return true}if(ac.substr(0,2)=="*."){if((af)==ac.substr(2)){return true}ae=af.length-ac.length+1;if((ae>0)&&(af.substr(ae)==ac.substr(1))){return true -}}}return false}function M(ae,ad){var af,ac="(^| )(piwik[_-]"+ad;if(n(ae)){for(af=0;af<ae.length;af++){ac+="|"+ae[af]}}ac+=")( |$)";return new RegExp(ac)}function Y(af,ac,ag){if(!ag){return"link"}var ae=M(S,"download"),ad=M(T,"link"),ah=new RegExp("\\.("+G+")([?&#]|$)","i");return ad.test(af)?"link":(ae.test(af)||ah.test(ac)?"download":0)}function E(aj){var ad,ai,ak,ac;if(!n(aj)){aj=l.event}if(n(aj.target)){ad=aj.target}else{if(n(aj.srcElement)){ad=aj.srcElement}else{return}}while((ai=ad.parentNode)&&((ak=ad.tagName)!="A"&&ak!="AREA")){ad=ai}if(n(ad.href)){var ah=ad.hostname,af=ah.toLowerCase(),ae=ad.href.replace(ah,af),ag=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript): *","i");if(!ag.test(ae)){ac=Y(ad.className,ae,L(af));if(ac){F(ae,ac)}}}}function U(ac){e(ac,"click",E,false)}function J(){if(!K){K=true;var ad,ac=M(u,"ignore"),ae=d.links;if(ae){for(ad=0;ad<ae.length;ad++){if(!ac.test(ae[ad].className)){U(ae[ad])}}}}}function x(ad,ac){var ae=null;if(typeof ad=="string"&&!n(v[ad])){if(typeof ac=="object"){ae=ac -}else{if(typeof ac=="string"){try{eval("hookObj ="+ac)}catch(af){}}}v[ad]=ae}return ae}w=I();y=N();A();k("run",x);return{hook:v,getHook:function(ac){return v[ac]},setTrackerUrl:function(ac){if(n(ac)){D=ac}},setSiteId:function(ac){if(n(ac)){aa=ac}},setCustomData:function(ac){if(n(ac)){O=ac}},setLinkTrackingTimer:function(ac){if(n(ac)){C=ac}},setDownloadExtensions:function(ac){if(n(ac)){G=ac}},addDownloadExtensions:function(ac){if(n(ac)){G+="|"+ac}},setDomains:function(ac){if(typeof ac=="object"&&ac instanceof Array){R=ac;R[R.length]=i}else{if(typeof ac=="string"){R=[ac,i]}}},setIgnoreClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){u=ac}else{if(typeof ac=="string"){u=[ac]}}},setCustomUrl:function(ac){if(n(ac)){V=ac}},setDocumentTitle:function(ac){if(n(ac)){Z=ac}},setDownloadClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){S=ac}else{if(typeof ac=="string"){S=[ac]}}},setDownloadClass:function(ac){if(typeof ac=="string"){S=[ac]}},setLinkClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){T=ac -}else{if(typeof ac=="string"){T=[ac]}}},setLinkClass:function(ac){if(typeof ac=="string"){T=[ac]}},addListener:function(ac){if(n(ac)){U(ac)}},enableLinkTracking:function(){if(h){J()}else{o[o.length]=function(){J()}}},trackGoal:function(ac,ae,ad){W(ac,ae,ad)},trackLink:function(ad,ac,ae){F(ad,ac,ae)},trackPageView:function(ac){r(ac)}}}e(l,"beforeunload",m,false);a();return{addPlugin:function(q,r){f[q]=r},getTracker:function(q,r){return new j(q,r)}}}());piwik_log=function(b,e,c,f){function a(g){try{return eval("piwik_"+g)}catch(h){}return}var d=Piwik.getTracker(c,e);d.setDocumentTitle(b);d.setCustomData(f);d.setLinkTrackingTimer(a("tracker_pause"));d.setDownloadExtensions(a("download_extensions"));d.setDomains(a("hosts_alias"));d.setIgnoreClasses(a("ignore_classes"));d.trackPageView();if(a("install_tracker")!==false){piwik_track=function(h,j,i,g){d.setSiteId(j);d.setTrackerUrl(i);d.trackLink(h,g)};d.enableLinkTracking()}}};
\ No newline at end of file +var Piwik,piwik_log,piwik_track;if(!this.Piwik){Piwik=(function(){var c,i={},e=document,d=navigator,g=screen,m=window,j=m.location.hostname,f=false,o=[];function n(q){return typeof q!=="undefined"}function h(q,s,r,t){if(q.addEventListener){q.addEventListener(s,r,t);return true}else{if(q.attachEvent){return q.attachEvent("on"+s,r)}}q["on"+s]=r}function l(s,u){var t="",r,q;for(r in i){q=i[r][s];if(typeof q==="function"){t+=q(u)}}return t}function b(q){if(n(c)){var r=new Date();while(r.getTime()<c){r=new Date()}}l("unload")}function p(r){if(!f){f=true;l("load");for(var q=0;q<o.length;q++){o[q]()}}return true}function a(){if(e.addEventListener){h(e,"DOMContentLoaded",function(){e.removeEventListener("DOMContentLoaded",arguments.callee,false);p()})}else{if(e.attachEvent){e.attachEvent("onreadystatechange",function(){if(e.readyState==="complete"){e.detachEvent("onreadystatechange",arguments.callee); +p()}});if(e.documentElement.doScroll&&m==m.top){(function(){if(f){return}try{e.documentElement.doScroll("left")}catch(q){setTimeout(arguments.callee,0);return}p()}())}}}h(m,"load",p,false)}function k(Q,C){var E=Q||"",ab=C||"",T=e.location.href,Z=e.title,L="7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|t?bz2?|tgz|torrent|txt|wav|wma|wmv|wpd||xls|xml|z|zip",A=[j],U=[],x=[],u=[],D=500,O,R="0",w,P={pdf:["pdf","application/pdf","0"],quicktime:["qt","video/quicktime","0"],realplayer:["realp","audio/x-pn-realaudio-plugin","0"],wma:["wma","application/x-mplayer2","0"],director:["dir","application/x-director","0"],flash:["fla","application/x-shockwave-flash","0"],java:["java","application/x-java-vm","0"],gears:["gears","application/x-googlegears","0"],silverlight:["ag","application/x-silverlight","0"]},H=false,s=m.encodeURIComponent||escape,X=m.decodeURIComponent||unescape,aa=function(ae){var ah=new RegExp('[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',"g"),af={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"}; +function ac(ai){ah.lastIndex=0;return ah.test(ai)?'"'+ai.replace(ah,function(aj){var ak=af[aj];return typeof ak==="string"?ak:"\\u"+("0000"+aj.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+ai+'"'}function ad(ai){return ai<10?"0"+ai:ai}function ag(am,ak){var al,aj,ai,an,ao=ak[am];if(ao===null){return"null"}if(ao&&typeof ao==="object"&&typeof ao.toJSON==="function"){ao=ao.toJSON(am)}switch(typeof ao){case"string":return ac(ao);case"number":return isFinite(ao)?String(ao):"null";case"boolean":case"null":return String(ao);case"object":an=[];if(ao instanceof Array){for(al=0;al<ao.length;al++){an[al]=ag(al,ao)||"null"}ai=an.length===0?"[]":"["+an.join(",")+"]";return ai}if(ao instanceof Date){return ac(ao.getUTCFullYear()+"-"+ad(ao.getUTCMonth()+1)+"-"+ad(ao.getUTCDate())+"T"+ad(ao.getUTCHours())+":"+ad(ao.getUTCMinutes())+":"+ad(ao.getUTCSeconds())+"Z")}for(aj in ao){ai=ag(aj,ao);if(ai){an[an.length]=ac(aj)+":"+ai}}ai=an.length===0?"{}":"{"+an.join(",")+"}";return ai}}return ag("",{"":ae})},v={}; +function z(ah,af,ad,ag,ac,ai){var ae;if(ad){ae=new Date();ae.setTime(ae.getTime()+ad*86400000)}e.cookie=ah+"="+s(af)+(ad?";expires="+ae.toGMTString():"")+";path="+(ag?ag:"/")+(ac?";domain="+ac:"")+(ai?";secure":"")}function t(ae){var ac=new RegExp("(^|;)[ ]*"+ae+"=([^;]*)"),ad=ac.exec(e.cookie);return ad?X(ad[2]):0}function q(ae,ad){var ac=new Date(),af=new Image(1,1);c=ac.getTime()+ad;af.onLoad=function(){};af.src=ae}function y(){var ac,ad;if(typeof d.javaEnabled!=="undefined"&&d.javaEnabled()){P.java[2]="1"}if(typeof m.GearsFactory==="function"){P.gears[2]="1"}if(d.mimeTypes&&d.mimeTypes.length){for(ac in P){ad=d.mimeTypes[P[ac][1]];if(ad&&ad.enabledPlugin){P[ac][2]="1"}}}}function K(){var ac="";try{ac=top.document.referrer}catch(ae){if(parent){try{ac=parent.document.referrer}catch(ad){ac=""}}}if(ac===""){ac=e.referrer}return ac}function F(){var ac="_pk_testcookie";if(!n(d.cookieEnabled)){z(ac,"1");return t(ac)=="1"?"1":"0"}return d.cookieEnabled?"1":"0"}function J(){var ad,ac,ae;ac=new Date(); +ae="idsite="+ab+"&url="+s(T)+"&res="+g.width+"x"+g.height+"&h="+ac.getHours()+"&m="+ac.getMinutes()+"&s="+ac.getSeconds()+"&cookie="+R+"&urlref="+s(w)+"&rand="+Math.random();for(ad in P){ae+="&"+P[ad][0]+"="+P[ad][2]}ae=E+"?"+ae;return ae}function Y(){var ac=J();ac+="&action_name="+s(Z);if(n(O)){ac+="&data="+s(aa(O))}ac+=l("log");q(ac,D)}function W(ac,af,ae){var ad=J();ad+="&idgoal="+ac;if(n(af)&&af!==null){ad+="&revenue="+af}if(n(ae)){if(ae!==null){ad+="&data="+s(aa(ae))}}else{if(n(O)){ad+="&data="+s(aa(O))}}ad+=l("goal");q(ad,D)}function B(ad,ac,af){var ae;ae="idsite="+ab+"&"+ac+"="+s(ad)+"&rand="+Math.random()+"&redirect=0";if(n(af)){if(af!==null){ae+="&data="+s(aa(af))}}else{if(n(O)){ae+="&data="+s(aa(O))}}ae+=l("click");ae=E+"?"+ae;q(ae,D)}function M(ae){var ad,ac,af;for(ad=0;ad<A.length;ad++){ac=A[ad];if(ae==ac){return true}if(ac.substr(0,2)=="*."){if((ae)==ac.substr(2)){return true}af=ae.length-ac.length+1;if((af>0)&&(ae.substr(af)==ac.substr(1))){return true}}}return false}function N(ac,ae){var ad,af="(^| )(piwik_"+ae; +if(n(ac)){for(ad=0;ad<ac.length;ad++){af+="|"+ac[ad]}}af+=")( |$)";return new RegExp(af)}function r(ae,ad,ac){if(!ac){return"link"}var af=N(x,"download"),ag=N(u,"link"),ah=new RegExp("\\.("+L+")([?&#]|$)","i");return ag.test(ae)?"link":(af.test(ae)||ah.test(ad)?"download":0)}function G(ai){var ag,aj,ak,ac;if(!n(ai)){ai=m.event}if(n(ai.target)){ag=ai.target}else{if(n(ai.srcElement)){ag=ai.srcElement}else{return}}while((aj=ag.parentNode)&&((ak=ag.tagName)!="A"&&ak!="AREA")){ag=aj}if(n(ag.href)){var ae=ag.hostname,af=ae.toLowerCase(),ah=ag.href.replace(ae,af),ad=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript): *","i");if(!ad.test(ah)){ac=r(ag.className,ah,M(af));if(ac){B(ah,ac)}}}}function V(ac){h(ac,"click",G,false)}function I(){if(!H){H=true;var ad,ac=N(U,"ignore"),ae=e.links;if(ae){for(ad=0;ad<ae.length;ad++){if(!ac.test(ae[ad].className)){V(ae[ad])}}}}}function S(ac,ae){var ad=null;if(typeof ac=="string"&&!n(v[ac])){if(typeof ae=="object"){ad=ae}else{if(typeof ae=="string"){try{eval("hookObj ="+ae) +}catch(af){}}}v[ac]=ad}return ad}w=K();R=F();y();l("run",S);return{hook:v,getHook:function(ac){return v[ac]},setTrackerUrl:function(ac){if(n(ac)){E=ac}},setSiteId:function(ac){if(n(ac)){ab=ac}},setCustomData:function(ac){if(n(ac)){O=ac}},setLinkTrackingTimer:function(ac){if(n(ac)){D=ac}},setDownloadExtensions:function(ac){if(n(ac)){L=ac}},addDownloadExtensions:function(ac){if(n(ac)){L+="|"+ac}},setDomains:function(ac){if(typeof ac=="object"&&ac instanceof Array){A=ac;A[A.length]=j}else{if(typeof ac=="string"){A=[ac,j]}}},setIgnoreClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){U=ac}else{if(typeof ac=="string"){U=[ac]}}},setCustomUrl:function(ac){if(n(ac)){T=ac}},setDocumentTitle:function(ac){if(n(ac)){Z=ac}},setDownloadClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){x=ac}else{if(typeof ac=="string"){x=[ac]}}},setDownloadClass:function(ac){if(typeof ac=="string"){x=[ac]}},setLinkClasses:function(ac){if(typeof ac=="object"&&ac instanceof Array){u=ac}else{if(typeof ac=="string"){u=[ac] +}}},setLinkClass:function(ac){if(typeof ac=="string"){u=[ac]}},addListener:function(ac){if(n(ac)){V(ac)}},enableLinkTracking:function(){if(f){I()}else{o[o.length]=function(){I()}}},trackGoal:function(ac,ae,ad){W(ac,ae,ad)},trackLink:function(ad,ac,ae){B(ad,ac,ae)},trackPageView:function(){Y()}}}h(m,"beforeunload",b,false);a();return{addPlugin:function(q,r){i[q]=r},getTracker:function(q,r){return new k(q,r)}}}());piwik_log=function(c,f,a,e){function b(g){try{return eval("piwik_"+g)}catch(h){}return}var d=Piwik.getTracker(a,f);d.setDocumentTitle(c);d.setCustomData(e);d.setLinkTrackingTimer(b("tracker_pause"));d.setDownloadExtensions(b("download_extensions"));d.setDomains(b("hosts_alias"));d.setIgnoreClasses(b("ignore_classes"));d.trackPageView();if(b("install_tracker")!==false){piwik_track=function(i,j,h,g){d.setSiteId(j);d.setTrackerUrl(h);d.trackLink(i,g)};d.enableLinkTracking()}}};
\ No newline at end of file |