Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2017-04-14 02:26:19 +0300
committerGitHub <noreply@github.com>2017-04-14 02:26:19 +0300
commit4de1d0812604c37b4bb484d535f03757d182ebea (patch)
treee3b6f9317263e02c8f29a06d689fd14d1fcee19a /piwik.js
parent024799a7bd7e6cc49bfcaebc1bf8de82cb46450c (diff)
New JS Tracker methods to retrieve current URL and piwik URL (#11616)
* api tweaks * added tests * added docs and minified piwik * fix tests
Diffstat (limited to 'piwik.js')
-rw-r--r--piwik.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/piwik.js b/piwik.js
index 5cbcd0a3fa..c876ba8251 100644
--- a/piwik.js
+++ b/piwik.js
@@ -37,7 +37,7 @@ var aj=this.findMediaUrlInNode(ah);if(aj){return this.toAbsoluteUrl(aj)}},findCo
}var aj=["img","embed","video","audio"];var ah=al.nodeName.toLowerCase();if(-1!==J(aj,ah)&&Y.findFirstNodeHavingAttributeWithValue(al,"src")){var ak=Y.findFirstNodeHavingAttributeWithValue(al,"src");return Y.getAttributeValueFromNode(ak,"src")}if(ah==="object"&&Y.hasNodeAttributeWithValue(al,"data")){return Y.getAttributeValueFromNode(al,"data")}if(ah==="object"){var am=Y.findNodesByTagName(al,"param");if(am&&am.length){var ai;for(ai=0;ai<am.length;ai++){if("movie"===Y.getAttributeValueFromNode(am[ai],"name")&&Y.hasNodeAttributeWithValue(am[ai],"value")){return Y.getAttributeValueFromNode(am[ai],"value")}}}var an=Y.findNodesByTagName(al,"embed");if(an&&an.length){return this.findMediaUrlInNode(an[0])}}},trim:function(ah){if(ah&&String(ah)===ah){return ah.replace(/^\s+|\s+$/g,"")}return ah},isOrWasNodeInViewport:function(am){if(!am||!am.getBoundingClientRect||am.nodeType!==1){return true}var al=am.getBoundingClientRect();var ak=D.documentElement||{};var aj=al.top<0;if(aj&&am.offsetTop){aj=(am.offsetTop+al.height)>0
}var ai=ak.clientWidth;if(Q.innerWidth&&ai>Q.innerWidth){ai=Q.innerWidth}var ah=ak.clientHeight;if(Q.innerHeight&&ah>Q.innerHeight){ah=Q.innerHeight}return((al.bottom>0||aj)&&al.right>0&&al.left<ai&&((al.top<ah)||aj))},isNodeVisible:function(ai){var ah=i(ai);var aj=this.isOrWasNodeInViewport(ai);return ah&&aj},buildInteractionRequestParams:function(ah,ai,aj,ak){var al="";if(ah){al+="c_i="+r(ah)}if(ai){if(al){al+="&"}al+="c_n="+r(ai)}if(aj){if(al){al+="&"}al+="c_p="+r(aj)}if(ak){if(al){al+="&"}al+="c_t="+r(ak)}return al},buildImpressionRequestParams:function(ah,ai,aj){var ak="c_n="+r(ah)+"&c_p="+r(ai);if(aj){ak+="&c_t="+r(aj)}return ak},buildContentBlock:function(aj){if(!aj){return}var ah=this.findContentName(aj);var ai=this.findContentPiece(aj);var ak=this.findContentTarget(aj);ah=this.trim(ah);ai=this.trim(ai);ak=this.trim(ak);return{name:ah||"Unknown",piece:ai||"Unknown",target:ak||""}},collectContent:function(ak){if(!ak||!ak.length){return[]}var aj=[];var ah,ai;for(ah=0;ah<ak.length;
ah++){ai=this.buildContentBlock(ak[ah]);if(G(ai)){aj.push(ai)}}return aj},setLocation:function(ah){this.location=ah},getLocation:function(){var ah=this.location||Q.location;if(!ah.origin){ah.origin=ah.protocol+"//"+ah.hostname+(ah.port?":"+ah.port:"")}return ah},toAbsoluteUrl:function(ai){if((!ai||String(ai)!==ai)&&ai!==""){return ai}if(""===ai){return this.getLocation().href}if(ai.search(/^\/\//)!==-1){return this.getLocation().protocol+ai}if(ai.search(/:\/\//)!==-1){return ai}if(0===ai.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+ai}if(0===ai.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+ai}if(0===ai.search("^[a-zA-Z]{2,11}:")){return ai}if(ai.search(/^\//)!==-1){return this.getLocation().origin+ai}var ah="(.*/)";var aj=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(ah))[0];return aj+ai},isUrlToCurrentDomain:function(ai){var aj=this.toAbsoluteUrl(ai);if(!aj){return false}var ah=this.getLocation().origin;
-if(ah===aj){return true}if(0===String(aj).indexOf(ah)){if(":"===String(aj).substr(ah.length,1)){return false}return true}return false},setHrefAttribute:function(ai,ah){if(!ai||!ah){return}Y.setAnyAttribute(ai,"href",ah)},shouldIgnoreInteraction:function(aj){var ai=Y.hasNodeAttribute(aj,this.CONTENT_IGNOREINTERACTION_ATTR);var ah=Y.hasNodeCssClass(aj,this.CONTENT_IGNOREINTERACTION_CLASS);return ai||ah}};function L(ai,al){if(al){return al}if(w(ai,"?")){var ak=ai.indexOf("?");ai=ai.slice(0,ak)}if(O(ai,"piwik.php")){ai=f(ai,"piwik.php".length)}else{if(O(ai,".php")){var ah=ai.lastIndexOf("/");var aj=1;ai=ai.slice(0,ah+aj)}}if(O(ai,"/js/")){ai=f(ai,"js/".length)}return ai}function K(an){var ap="Piwik_Overlay";var ai=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aj=ai.exec(D.referrer);if(aj){var al=aj[1];if(al!==String(an)){return false}var am=aj[2],ah=aj[3],ak=aj[4];if(!ak){ak=""}else{if(ak.indexOf("&segment=")===0){ak=ak.substr("&segment=".length)
+if(ah===aj){return true}if(0===String(aj).indexOf(ah)){if(":"===String(aj).substr(ah.length,1)){return false}return true}return false},setHrefAttribute:function(ai,ah){if(!ai||!ah){return}Y.setAnyAttribute(ai,"href",ah)},shouldIgnoreInteraction:function(aj){var ai=Y.hasNodeAttribute(aj,this.CONTENT_IGNOREINTERACTION_ATTR);var ah=Y.hasNodeCssClass(aj,this.CONTENT_IGNOREINTERACTION_CLASS);return ai||ah}};function L(ai,al){if(al){return al}ai=t.toAbsoluteUrl(ai);if(w(ai,"?")){var ak=ai.indexOf("?");ai=ai.slice(0,ak)}if(O(ai,"piwik.php")){ai=f(ai,"piwik.php".length)}else{if(O(ai,".php")){var ah=ai.lastIndexOf("/");var aj=1;ai=ai.slice(0,ah+aj)}}if(O(ai,"/js/")){ai=f(ai,"js/".length)}return ai}function K(an){var ap="Piwik_Overlay";var ai=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=.*)?$");var aj=ai.exec(D.referrer);if(aj){var al=aj[1];if(al!==String(an)){return false}var am=aj[2],ah=aj[3],ak=aj[4];if(!ak){ak=""}else{if(ak.indexOf("&segment=")===0){ak=ak.substr("&segment=".length)
}}Q.name=ap+"###"+am+"###"+ah+"###"+ak}var ao=Q.name.split("###");return ao.length===4&&ao[0]===ap}function U(ai,ao,ak){var an=Q.name.split("###"),am=an[1],ah=an[2],al=an[3],aj=L(ai,ao);m(aj+"plugins/Overlay/client/client.js?v=1",function(){Piwik_Overlay_Client.initialize(aj,ak,am,ah,al)})}function s(){var aj;try{aj=Q.frameElement}catch(ai){return true}if(G(aj)){return(aj&&String(aj.nodeName).toLowerCase()==="iframe")?true:false}try{return Q.self!==Q.top}catch(ah){return true}}function N(bV,bP){var bq=this,bL=V(D.domain,Q.location.href,H()),cw=I(bL[0]),bv=n(bL[1]),a9=n(bL[2]),cu=false,bZ="GET",cJ=bZ,az="application/x-www-form-urlencoded; charset=UTF-8",cd=az,av=bV||"",bp="",cA="",bN=bP||"",bi="",bw="",aT,a5="",cG=["7z","aac","apk","arc","arj","asf","asx","avi","azw3","bin","csv","deb","dmg","doc","docx","epub","exe","flv","gif","gz","gzip","hqx","ibooks","jar","jpg","jpeg","js","mobi","mp2","mp3","mp4","mpg","mpeg","mov","movie","msi","msp","odb","odf","odg","ods","odt","ogg","ogv","pdf","phps","png","ppt","pptx","qt","qtm","ra","ram","rar","rpm","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],ao=[cw],bj=[],bt=[],aW=[],br=500,cm,aU,bz,bx,ah,b8=["pk_campaign","piwik_campaign","utm_campaign","utm_source","utm_medium"],bo=["pk_kwd","piwik_kwd","utm_term"],a6="_pk_",an="pk_vid",cy,bb,a7=false,cs,a1,bf,cn=33955200000,b6=1800000,cF=15768000000,aR=true,b4=0,by=false,aG=false,bS,bD={},b3={},a8={},be=200,cB={},cH={},bR=[],bW=false,cg=false,ai=false,cI=false,cp=false,aE=false,a0=s(),cz=null,bT,aH,bk,bO=af,ba,aB;
try{a5=D.title}catch(ce){a5=""}function cM(cX,cU,cT,cW,cS,cV){if(a7){return}var cR;if(cT){cR=new Date();cR.setTime(cR.getTime()+cT)}D.cookie=cX+"="+r(cU)+(cT?";expires="+cR.toGMTString():"")+";path="+(cW||"/")+(cS?";domain="+cS:"")+(cV?";secure":"")}function au(cT){if(a7){return 0}var cR=new RegExp("(^|;)[ ]*"+cT+"=([^;]*)"),cS=cR.exec(D.cookie);return cS?P(cS[2]):0}function bJ(cR){var cS;cR=j(cR,an);if(bx){cS=new RegExp("#.*");return cR.replace(cS,"")}return cR}function bC(cT,cR){var cU=q(cR),cS;if(cU){return cR}if(cR.slice(0,1)==="/"){return q(cT)+"://"+c(cT)+cR}cT=bJ(cT);cS=cT.indexOf("?");if(cS>=0){cT=cT.slice(0,cS)}cS=cT.lastIndexOf("/");if(cS!==cT.length-1){cT=cT.slice(0,cS+1)}return cT+cR}function cl(cT,cR){var cS;cT=String(cT).toLowerCase();cR=String(cR).toLowerCase();if(cT===cR){return true}if(cR.slice(0,1)==="."){if(cT===cR.slice(1)){return true}cS=cT.length-cR.length;if((cS>0)&&(cT.slice(cS)===cR)){return true}}return false}function b2(cR){var cS=document.createElement("a");if(cR.indexOf("//")!==0&&cR.indexOf("http")!==0){if(cR.indexOf("*")===0){cR=cR.substr(1)
}if(cR.indexOf(".")===0){cR=cR.substr(1)}cR="http://"+cR}cS.href=t.toAbsoluteUrl(cR);if(cS.pathname){return cS.pathname}return""}function aS(cS,cR){if(!ac(cR,"/")){cR="/"+cR}if(!ac(cS,"/")){cS="/"+cS}var cT=(cR==="/"||cR==="/*");if(cT){return true}if(cS===cR){return true}cR=String(cR).toLowerCase();cS=String(cS).toLowerCase();if(O(cR,"*")){cR=cR.slice(0,-1);cT=(!cR||cR==="/");if(cT){return true}if(cS===cR){return true}return cS.indexOf(cR)===0}if(!O(cS,"/")){cS+="/"}if(!O(cR,"/")){cR+="/"}return cS.indexOf(cR)===0}function ak(cV,cX){var cS,cR,cT,cU,cW;for(cS=0;cS<ao.length;cS++){cU=I(ao[cS]);cW=b2(ao[cS]);if(cl(cV,cU)&&aS(cX,cW)){return true}}return false}function aL(cU){var cS,cR,cT;for(cS=0;cS<ao.length;cS++){cR=I(ao[cS].toLowerCase());if(cU===cR){return true}if(cR.slice(0,1)==="."){if(cU===cR.slice(1)){return true}cT=cU.length-cR.length;if((cT>0)&&(cU.slice(cT)===cR)){return true}}}return false}function b7(cR,cT){var cS=new Image(1,1);cS.onload=function(){B=0;if(typeof cT==="function"){cT()
@@ -58,19 +58,19 @@ bn(cS,br)}function cC(cU,cR,cY,cX,cT){var cW=cR+"="+r(bJ(cU));var cS=cb(cT,"clic
if(!cS){return false}var cR=cU.pathname||b2(cU.href);var cT=(cU.hostname||c(cU.href)).toLowerCase();if(ak(cT,cR)){if(!cl(cw,I(cT))){return true}return false}return false}function ck(cR){var cS=cK(cR);if(cS&&cS.type){cS.href=n(cS.href);cC(cS.href,cS.type,undefined,null,cR);return}if(cp){cR=al(cR);if(ar(cR)){b0(cR)}}}function cc(){return D.all&&!D.addEventListener}function cx(cR){var cT=cR.which;var cS=(typeof cR.button);if(!cT&&cS!=="undefined"){if(cc()){if(cR.button&1){cT=1}else{if(cR.button&2){cT=3}else{if(cR.button&4){cT=2}}}}else{if(cR.button===0||cR.button==="0"){cT=1}else{if(cR.button&1){cT=2}else{if(cR.button&2){cT=3}}}}}return cT}function bA(cR){switch(cx(cR)){case 1:return"left";case 2:return"middle";case 3:return"right"}}function aQ(cR){return cR.target||cR.srcElement}function at(cR){return function(cU){cU=cU||Q.event;var cT=bA(cU);var cV=aQ(cU);if(cU.type==="click"){var cS=false;if(cR&&cT==="middle"){cS=true}if(cV&&!cS){ck(cV)}}else{if(cU.type==="mousedown"){if(cT==="middle"&&cV){aH=cT;
bk=cV}else{aH=bk=null}}else{if(cU.type==="mouseup"){if(cT===aH&&cV===bk){ck(cV)}aH=bk=null}else{if(cU.type==="contextmenu"){ck(cV)}}}}}}function aj(cT,cS){var cR=typeof cS;if(cR==="undefined"){cS=true}ag(cT,"click",at(cS),false);if(cS){ag(cT,"mouseup",at(cS),false);ag(cT,"mousedown",at(cS),false);ag(cT,"contextmenu",at(cS),false)}}function bl(cT,cV){ai=true;var cU,cS=aP(bj,"ignore"),cW=D.links,cR=null,cX=null;if(cW){for(cU=0;cU<cW.length;cU++){cR=cW[cU];if(!cS.test(cR.className)){cX=typeof cR.piwikTrackers;if("undefined"===cX){cR.piwikTrackers=[]}if(-1===J(cR.piwikTrackers,cV)){cR.piwikTrackers.push(cV);aj(cR,cT)}}}}}function aI(cT,cV,cW){if(bW){return true}bW=true;var cX=false;var cU,cS;function cR(){cX=true}l(function(){function cY(c0){setTimeout(function(){if(!bW){return}cX=false;cW.trackVisibleContentImpressions();cY(c0)},c0)}function cZ(c0){setTimeout(function(){if(!bW){return}if(cX){cX=false;cW.trackVisibleContentImpressions()}cZ(c0)},c0)}if(cT){cU=["scroll","resize"];for(cS=0;cS<cU.length;
cS++){if(D.addEventListener){D.addEventListener(cU[cS],cR)}else{Q.attachEvent("on"+cU[cS],cR)}}cZ(100)}if(cV&&cV>0){cV=parseInt(cV,10);cY(cV)}})}function cj(){var cS,cU,cV={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(!((new RegExp("MSIE")).test(g.userAgent))){if(g.mimeTypes&&g.mimeTypes.length){for(cS in cV){if(Object.prototype.hasOwnProperty.call(cV,cS)){cU=g.mimeTypes[cV[cS]];cH[cS]=(cU&&cU.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&G(g.javaEnabled)&&g.javaEnabled()){cH.java="1"}if(x(Q.GearsFactory)){cH.gears="1"}cH.cookie=bM()}var cT=parseInt(T.width,10);var cR=parseInt(T.height,10);cH.res=parseInt(cT,10)+"x"+parseInt(cR,10)}cj();a4();aC();this.getVisitorId=function(){return aN().uuid};this.getVisitorInfo=function(){return cq()};this.getAttributionInfo=function(){return bu()
-};this.getAttributionCampaignName=function(){return bu()[0]};this.getAttributionCampaignKeyword=function(){return bu()[1]};this.getAttributionReferrerTimestamp=function(){return bu()[2]};this.getAttributionReferrerUrl=function(){return bu()[3]};this.setTrackerUrl=function(cR){av=cR};this.getTrackerUrl=function(){return av};this.addTracker=function(cR,cT){if(!cT){throw new Error("A siteId must be given to add a new tracker")}if(!G(cR)||null===cR){cR=this.getTrackerUrl()}var cS=new N(cR,cT);F.push(cS);return cS};this.getSiteId=function(){return bN};this.setSiteId=function(cR){bK(cR)};this.setUserId=function(cR){if(!G(cR)||!cR.length){return}bi=cR;bw=bO(bi).substr(0,16)};this.getUserId=function(){return bi};this.setCustomData=function(cR,cS){if(S(cR)){ah=cR}else{if(!ah){ah={}}ah[cR]=cS}};this.getCustomData=function(){return ah};this.setCustomRequestProcessing=function(cR){bS=cR};this.appendToTrackingUrl=function(cR){cA=cR};this.getRequest=function(cR){return b9(cR)};this.addPlugin=function(cR,cS){a[cR]=cS
-};this.setCustomDimension=function(cR,cS){cR=parseInt(cR,10);if(cR>0){if(!G(cS)){cS=""}if(!u(cS)){cS=String(cS)}a8[cR]=cS}};this.getCustomDimension=function(cR){cR=parseInt(cR,10);if(cR>0&&Object.prototype.hasOwnProperty.call(a8,cR)){return a8[cR]}};this.deleteCustomDimension=function(cR){cR=parseInt(cR,10);if(cR>0){delete a8[cR]}};this.setCustomVariable=function(cS,cR,cV,cT){var cU;if(!G(cT)){cT="visit"}if(!G(cR)){return}if(!G(cV)){cV=""}if(cS>0){cR=!u(cR)?String(cR):cR;cV=!u(cV)?String(cV):cV;cU=[cR.slice(0,be),cV.slice(0,be)];if(cT==="visit"||cT===2){ci();aG[cS]=cU}else{if(cT==="page"||cT===3){bD[cS]=cU}else{if(cT==="event"){b3[cS]=cU}}}}};this.getCustomVariable=function(cS,cT){var cR;if(!G(cT)){cT="visit"}if(cT==="page"||cT===3){cR=bD[cS]}else{if(cT==="event"){cR=b3[cS]}else{if(cT==="visit"||cT===2){ci();cR=aG[cS]}}}if(!G(cR)||(cR&&cR[0]==="")){return false}return cR};this.deleteCustomVariable=function(cR,cS){if(this.getCustomVariable(cR,cS)){this.setCustomVariable(cR,"","",cS)}};this.deleteCustomVariables=function(cR){if(cR==="page"||cR===3){bD={}
-}else{if(cR==="event"){b3={}}else{if(cR==="visit"||cR===2){aG={}}}}};this.storeCustomVariablesInCookie=function(){by=true};this.setLinkTrackingTimer=function(cR){br=cR};this.getLinkTrackingTimer=function(){return br};this.setDownloadExtensions=function(cR){if(u(cR)){cR=cR.split("|")}cG=cR};this.addDownloadExtensions=function(cS){var cR;if(u(cS)){cS=cS.split("|")}for(cR=0;cR<cS.length;cR++){cG.push(cS[cR])}};this.removeDownloadExtensions=function(cT){var cS,cR=[];if(u(cT)){cT=cT.split("|")}for(cS=0;cS<cG.length;cS++){if(J(cT,cG[cS])===-1){cR.push(cG[cS])}}cG=cR};this.setDomains=function(cR){ao=u(cR)?[cR]:cR;var cV=false,cT=0,cS;for(cT;cT<ao.length;cT++){cS=String(ao[cT]);if(cl(cw,I(cS))){cV=true;break}var cU=b2(cS);if(cU&&cU!=="/"&&cU!=="/*"){cV=true;break}}if(!cV){ao.push(cw)}};this.enableCrossDomainLinking=function(){cp=true};this.disableCrossDomainLinking=function(){cp=false};this.isCrossDomainLinkingEnabled=function(){return cp};this.setIgnoreClasses=function(cR){bj=u(cR)?[cR]:cR};this.setRequestMethod=function(cR){cJ=cR||bZ
-};this.setRequestContentType=function(cR){cd=cR||az};this.setReferrerUrl=function(cR){a9=cR};this.setCustomUrl=function(cR){aT=bC(bv,cR)};this.setDocumentTitle=function(cR){a5=cR};this.setAPIUrl=function(cR){bp=cR};this.setDownloadClasses=function(cR){bt=u(cR)?[cR]:cR};this.setLinkClasses=function(cR){aW=u(cR)?[cR]:cR};this.setCampaignNameKey=function(cR){b8=u(cR)?[cR]:cR};this.setCampaignKeywordKey=function(cR){bo=u(cR)?[cR]:cR};this.discardHashTag=function(cR){bx=cR};this.setCookieNamePrefix=function(cR){a6=cR;aG=bE()};this.setCookieDomain=function(cR){var cS=I(cR);if(bg(cS)){cy=cS;a4()}};this.setCookiePath=function(cR){bb=cR;a4()};this.setVisitorCookieTimeout=function(cR){cn=cR*1000};this.setSessionCookieTimeout=function(cR){b6=cR*1000};this.setReferralCookieTimeout=function(cR){cF=cR*1000};this.setConversionAttributionFirstReferrer=function(cR){bf=cR};this.disableCookies=function(){a7=true;cH.cookie="0";if(bN){aw()}};this.deleteCookies=function(){aw()};this.setDoNotTrack=function(cS){var cR=g.doNotTrack||g.msDoNotTrack;
-cs=cS&&(cR==="yes"||cR==="1");if(cs){this.disableCookies()}};this.addListener=function(cS,cR){aj(cS,cR)};this.enableLinkTracking=function(cS){cI=true;var cR=this;bY(function(){o(function(){bl(cS,cR)})})};this.enableJSErrorTracking=function(){if(cu){return}cu=true;var cR=Q.onerror;Q.onerror=function(cW,cU,cT,cV,cS){bY(function(){var cX="JavaScript Errors";var cY=cU+":"+cT;if(cV){cY+=":"+cV}am(cX,cY,cW)});if(cR){return cR(cW,cU,cT,cV,cS)}return false}};this.disablePerformanceTracking=function(){aR=false};this.setGenerationTimeMs=function(cR){b4=parseInt(cR,10)};this.enableHeartBeatTimer=function(cR){cR=Math.max(cR,1);aU=(cR||15)*1000;if(cz!==null){cO()}};this.disableHeartBeatTimer=function(){bs();if(aU||aE){if(Q.removeEventListener){Q.removeEventListener("focus",aY,true);Q.removeEventListener("blur",ap,true)}else{if(Q.detachEvent){Q.detachEvent("onfocus",aY);Q.detachEvent("onblur",ap)}}}aU=null;aE=false};this.killFrame=function(){if(Q.location!==Q.top.location){Q.top.location=Q.location}};
-this.redirectFile=function(cR){if(Q.location.protocol==="file:"){Q.location=cR}};this.setCountPreRendered=function(cR){a1=cR};this.trackGoal=function(cR,cT,cS){bY(function(){cv(cR,cT,cS)})};this.trackLink=function(cS,cR,cU,cT){bY(function(){cC(cS,cR,cU,cT)})};this.trackPageView=function(cR,cT,cS){bR=[];if(K(bN)){bY(function(){U(av,bp,bN)})}else{bY(function(){bH(cR,cT,cS)})}};this.trackAllContentImpressions=function(){if(K(bN)){return}bY(function(){o(function(){var cR=t.findContentNodes();var cS=cf(cR);cN(cS,br)})})};this.trackVisibleContentImpressions=function(cR,cS){if(K(bN)){return}if(!G(cR)){cR=true}if(!G(cS)){cS=750}aI(cR,cS,this);bY(function(){l(function(){var cT=t.findContentNodes();var cU=aX(cT);cN(cU,br)})})};this.trackContentImpression=function(cT,cR,cS){if(K(bN)){return}if(!cT){return}cR=cR||"Unknown";bY(function(){var cU=ax(cT,cR,cS);bn(cU,br)})};this.trackContentImpressionsWithinNode=function(cR){if(K(bN)||!cR){return}bY(function(){if(bW){l(function(){var cS=t.findContentNodesWithinNode(cR);
-var cT=aX(cS);cN(cT,br)})}else{o(function(){var cS=t.findContentNodesWithinNode(cR);var cT=cf(cS);cN(cT,br)})}})};this.trackContentInteraction=function(cT,cU,cR,cS){if(K(bN)){return}if(!cT||!cU){return}cR=cR||"Unknown";bY(function(){var cV=aF(cT,cU,cR,cS);bn(cV,br)})};this.trackContentInteractionNode=function(cS,cR){if(K(bN)||!cS){return}bY(function(){var cT=cL(cS,cR);bn(cT,br)})};this.logAllContentBlocksOnPage=function(){var cS=t.findContentNodes();var cR=t.collectContent(cS);if(console!==undefined&&console&&console.log){console.log(cR)}};this.trackEvent=function(cS,cU,cR,cT,cW,cV){bY(function(){am(cS,cU,cR,cT,cW,cV)})};this.trackSiteSearch=function(cR,cT,cS,cU){bY(function(){bQ(cR,cT,cS,cU)})};this.setEcommerceView=function(cU,cR,cT,cS){if(!G(cT)||!cT.length){cT=""}else{if(cT instanceof Array){cT=JSON_PIWIK.stringify(cT)}}bD[5]=["_pkc",cT];if(G(cS)&&String(cS).length){bD[2]=["_pkp",cS]}if((!G(cU)||!cU.length)&&(!G(cR)||!cR.length)){return}if(G(cU)&&cU.length){bD[3]=["_pks",cU]}if(!G(cR)||!cR.length){cR=""
-}bD[4]=["_pkn",cR]};this.addEcommerceItem=function(cV,cR,cT,cS,cU){if(cV.length){cB[cV]=[cV,cR,cT,cS,cU]}};this.trackEcommerceOrder=function(cR,cV,cU,cT,cS,cW){bG(cR,cV,cU,cT,cS,cW)};this.trackEcommerceCartUpdate=function(cR){bd(cR)};this.trackRequest=function(cS,cU,cT,cR){bY(function(){var cV=b9(cS,cU,cR);bn(cV,br,cT)})};d.trigger("TrackerSetup",[this])}function E(){return{push:Z}}function b(am,al){var an={};var aj,ak;for(aj=0;aj<al.length;aj++){var ah=al[aj];an[ah]=1;for(ak=0;ak<am.length;ak++){if(am[ak]&&am[ak][0]){var ai=am[ak][0];if(ah===ai){Z(am[ak]);delete am[ak];if(an[ai]>1){ad("The method "+ai+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')}an[ai]++}}}}return am}var z=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","enableLinkTracking"];
-function X(ah,aj){var ai=new N(ah,aj);F.push(ai);_paq=b(_paq,z);for(B=0;B<_paq.length;B++){if(_paq[B]){Z(_paq[B])}}_paq=new E();return ai}ag(Q,"beforeunload",ab,false);Date.prototype.getTimeAlias=Date.prototype.getTime;d={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ak,aj,ai,ah){var al=typeof ah;if(al==="undefined"){ah=false}ag(ak,aj,ai,ah)},onLoad:l,onReady:o,isNodeVisible:i,isOrWasNodeVisible:t.isNodeVisible},on:function(ai,ah){if(!v[ai]){v[ai]=[]}v[ai].push(ah)},off:function(aj,ai){if(!v[aj]){return}var ah=0;for(ah;ah<v[aj].length;ah++){if(v[aj][ah]===ai){v[aj].splice(ah,1)}}},trigger:function(aj,ak,ai){if(!v[aj]){return}var ah=0;for(ah;ah<v[aj].length;ah++){v[aj][ah].apply(ai||Q,ak)}},addPlugin:function(ah,ai){a[ah]=ai},getTracker:function(ah,ai){if(!G(ai)){ai=this.getAsyncTracker().getSiteId()}if(!G(ah)){ah=this.getAsyncTracker().getTrackerUrl()}return new N(ah,ai)},getAsyncTrackers:function(){return F},addTracker:function(ah,ai){if(!F.length){X(ah,ai)}else{F[0].addTracker(ah,ai)
-}},getAsyncTracker:function(ai,al){var ak;if(F&&F.length&&F[0]){ak=F[0]}else{return X(ai,al)}if(!al&&!ai){return ak}if((!G(al)||null===al)&&ak){al=ak.getSiteId()}if((!G(ai)||null===ai)&&ak){ai=ak.getTrackerUrl()}var aj,ah=0;for(ah;ah<F.length;ah++){aj=F[ah];if(aj&&String(aj.getSiteId())===String(al)&&aj.getTrackerUrl()===ai){return aj}}},retryMissedPluginCalls:function(){var ai=aa;aa=[];var ah=0;for(ah;ah<ai.length;ah++){Z(ai[ah])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return d})}return d}());
+};this.getAttributionCampaignName=function(){return bu()[0]};this.getAttributionCampaignKeyword=function(){return bu()[1]};this.getAttributionReferrerTimestamp=function(){return bu()[2]};this.getAttributionReferrerUrl=function(){return bu()[3]};this.setTrackerUrl=function(cR){av=cR};this.getTrackerUrl=function(){return av};this.getPiwikUrl=function(){return L(this.getTrackerUrl(),bp)};this.addTracker=function(cR,cT){if(!cT){throw new Error("A siteId must be given to add a new tracker")}if(!G(cR)||null===cR){cR=this.getTrackerUrl()}var cS=new N(cR,cT);F.push(cS);return cS};this.getSiteId=function(){return bN};this.setSiteId=function(cR){bK(cR)};this.setUserId=function(cR){if(!G(cR)||!cR.length){return}bi=cR;bw=bO(bi).substr(0,16)};this.getUserId=function(){return bi};this.setCustomData=function(cR,cS){if(S(cR)){ah=cR}else{if(!ah){ah={}}ah[cR]=cS}};this.getCustomData=function(){return ah};this.setCustomRequestProcessing=function(cR){bS=cR};this.appendToTrackingUrl=function(cR){cA=cR};this.getRequest=function(cR){return b9(cR)
+};this.addPlugin=function(cR,cS){a[cR]=cS};this.setCustomDimension=function(cR,cS){cR=parseInt(cR,10);if(cR>0){if(!G(cS)){cS=""}if(!u(cS)){cS=String(cS)}a8[cR]=cS}};this.getCustomDimension=function(cR){cR=parseInt(cR,10);if(cR>0&&Object.prototype.hasOwnProperty.call(a8,cR)){return a8[cR]}};this.deleteCustomDimension=function(cR){cR=parseInt(cR,10);if(cR>0){delete a8[cR]}};this.setCustomVariable=function(cS,cR,cV,cT){var cU;if(!G(cT)){cT="visit"}if(!G(cR)){return}if(!G(cV)){cV=""}if(cS>0){cR=!u(cR)?String(cR):cR;cV=!u(cV)?String(cV):cV;cU=[cR.slice(0,be),cV.slice(0,be)];if(cT==="visit"||cT===2){ci();aG[cS]=cU}else{if(cT==="page"||cT===3){bD[cS]=cU}else{if(cT==="event"){b3[cS]=cU}}}}};this.getCustomVariable=function(cS,cT){var cR;if(!G(cT)){cT="visit"}if(cT==="page"||cT===3){cR=bD[cS]}else{if(cT==="event"){cR=b3[cS]}else{if(cT==="visit"||cT===2){ci();cR=aG[cS]}}}if(!G(cR)||(cR&&cR[0]==="")){return false}return cR};this.deleteCustomVariable=function(cR,cS){if(this.getCustomVariable(cR,cS)){this.setCustomVariable(cR,"","",cS)
+}};this.deleteCustomVariables=function(cR){if(cR==="page"||cR===3){bD={}}else{if(cR==="event"){b3={}}else{if(cR==="visit"||cR===2){aG={}}}}};this.storeCustomVariablesInCookie=function(){by=true};this.setLinkTrackingTimer=function(cR){br=cR};this.getLinkTrackingTimer=function(){return br};this.setDownloadExtensions=function(cR){if(u(cR)){cR=cR.split("|")}cG=cR};this.addDownloadExtensions=function(cS){var cR;if(u(cS)){cS=cS.split("|")}for(cR=0;cR<cS.length;cR++){cG.push(cS[cR])}};this.removeDownloadExtensions=function(cT){var cS,cR=[];if(u(cT)){cT=cT.split("|")}for(cS=0;cS<cG.length;cS++){if(J(cT,cG[cS])===-1){cR.push(cG[cS])}}cG=cR};this.setDomains=function(cR){ao=u(cR)?[cR]:cR;var cV=false,cT=0,cS;for(cT;cT<ao.length;cT++){cS=String(ao[cT]);if(cl(cw,I(cS))){cV=true;break}var cU=b2(cS);if(cU&&cU!=="/"&&cU!=="/*"){cV=true;break}}if(!cV){ao.push(cw)}};this.enableCrossDomainLinking=function(){cp=true};this.disableCrossDomainLinking=function(){cp=false};this.isCrossDomainLinkingEnabled=function(){return cp
+};this.setIgnoreClasses=function(cR){bj=u(cR)?[cR]:cR};this.setRequestMethod=function(cR){cJ=cR||bZ};this.setRequestContentType=function(cR){cd=cR||az};this.setReferrerUrl=function(cR){a9=cR};this.setCustomUrl=function(cR){aT=bC(bv,cR)};this.getCurrentUrl=function(){return aT||bv};this.setDocumentTitle=function(cR){a5=cR};this.setAPIUrl=function(cR){bp=cR};this.setDownloadClasses=function(cR){bt=u(cR)?[cR]:cR};this.setLinkClasses=function(cR){aW=u(cR)?[cR]:cR};this.setCampaignNameKey=function(cR){b8=u(cR)?[cR]:cR};this.setCampaignKeywordKey=function(cR){bo=u(cR)?[cR]:cR};this.discardHashTag=function(cR){bx=cR};this.setCookieNamePrefix=function(cR){a6=cR;aG=bE()};this.setCookieDomain=function(cR){var cS=I(cR);if(bg(cS)){cy=cS;a4()}};this.setCookiePath=function(cR){bb=cR;a4()};this.setVisitorCookieTimeout=function(cR){cn=cR*1000};this.setSessionCookieTimeout=function(cR){b6=cR*1000};this.setReferralCookieTimeout=function(cR){cF=cR*1000};this.setConversionAttributionFirstReferrer=function(cR){bf=cR
+};this.disableCookies=function(){a7=true;cH.cookie="0";if(bN){aw()}};this.deleteCookies=function(){aw()};this.setDoNotTrack=function(cS){var cR=g.doNotTrack||g.msDoNotTrack;cs=cS&&(cR==="yes"||cR==="1");if(cs){this.disableCookies()}};this.addListener=function(cS,cR){aj(cS,cR)};this.enableLinkTracking=function(cS){cI=true;var cR=this;bY(function(){o(function(){bl(cS,cR)})})};this.enableJSErrorTracking=function(){if(cu){return}cu=true;var cR=Q.onerror;Q.onerror=function(cW,cU,cT,cV,cS){bY(function(){var cX="JavaScript Errors";var cY=cU+":"+cT;if(cV){cY+=":"+cV}am(cX,cY,cW)});if(cR){return cR(cW,cU,cT,cV,cS)}return false}};this.disablePerformanceTracking=function(){aR=false};this.setGenerationTimeMs=function(cR){b4=parseInt(cR,10)};this.enableHeartBeatTimer=function(cR){cR=Math.max(cR,1);aU=(cR||15)*1000;if(cz!==null){cO()}};this.disableHeartBeatTimer=function(){bs();if(aU||aE){if(Q.removeEventListener){Q.removeEventListener("focus",aY,true);Q.removeEventListener("blur",ap,true)}else{if(Q.detachEvent){Q.detachEvent("onfocus",aY);
+Q.detachEvent("onblur",ap)}}}aU=null;aE=false};this.killFrame=function(){if(Q.location!==Q.top.location){Q.top.location=Q.location}};this.redirectFile=function(cR){if(Q.location.protocol==="file:"){Q.location=cR}};this.setCountPreRendered=function(cR){a1=cR};this.trackGoal=function(cR,cT,cS){bY(function(){cv(cR,cT,cS)})};this.trackLink=function(cS,cR,cU,cT){bY(function(){cC(cS,cR,cU,cT)})};this.trackPageView=function(cR,cT,cS){bR=[];if(K(bN)){bY(function(){U(av,bp,bN)})}else{bY(function(){bH(cR,cT,cS)})}};this.trackAllContentImpressions=function(){if(K(bN)){return}bY(function(){o(function(){var cR=t.findContentNodes();var cS=cf(cR);cN(cS,br)})})};this.trackVisibleContentImpressions=function(cR,cS){if(K(bN)){return}if(!G(cR)){cR=true}if(!G(cS)){cS=750}aI(cR,cS,this);bY(function(){l(function(){var cT=t.findContentNodes();var cU=aX(cT);cN(cU,br)})})};this.trackContentImpression=function(cT,cR,cS){if(K(bN)){return}if(!cT){return}cR=cR||"Unknown";bY(function(){var cU=ax(cT,cR,cS);bn(cU,br)})
+};this.trackContentImpressionsWithinNode=function(cR){if(K(bN)||!cR){return}bY(function(){if(bW){l(function(){var cS=t.findContentNodesWithinNode(cR);var cT=aX(cS);cN(cT,br)})}else{o(function(){var cS=t.findContentNodesWithinNode(cR);var cT=cf(cS);cN(cT,br)})}})};this.trackContentInteraction=function(cT,cU,cR,cS){if(K(bN)){return}if(!cT||!cU){return}cR=cR||"Unknown";bY(function(){var cV=aF(cT,cU,cR,cS);bn(cV,br)})};this.trackContentInteractionNode=function(cS,cR){if(K(bN)||!cS){return}bY(function(){var cT=cL(cS,cR);bn(cT,br)})};this.logAllContentBlocksOnPage=function(){var cS=t.findContentNodes();var cR=t.collectContent(cS);if(console!==undefined&&console&&console.log){console.log(cR)}};this.trackEvent=function(cS,cU,cR,cT,cW,cV){bY(function(){am(cS,cU,cR,cT,cW,cV)})};this.trackSiteSearch=function(cR,cT,cS,cU){bY(function(){bQ(cR,cT,cS,cU)})};this.setEcommerceView=function(cU,cR,cT,cS){if(!G(cT)||!cT.length){cT=""}else{if(cT instanceof Array){cT=JSON_PIWIK.stringify(cT)}}bD[5]=["_pkc",cT];
+if(G(cS)&&String(cS).length){bD[2]=["_pkp",cS]}if((!G(cU)||!cU.length)&&(!G(cR)||!cR.length)){return}if(G(cU)&&cU.length){bD[3]=["_pks",cU]}if(!G(cR)||!cR.length){cR=""}bD[4]=["_pkn",cR]};this.addEcommerceItem=function(cV,cR,cT,cS,cU){if(cV.length){cB[cV]=[cV,cR,cT,cS,cU]}};this.trackEcommerceOrder=function(cR,cV,cU,cT,cS,cW){bG(cR,cV,cU,cT,cS,cW)};this.trackEcommerceCartUpdate=function(cR){bd(cR)};this.trackRequest=function(cS,cU,cT,cR){bY(function(){var cV=b9(cS,cU,cR);bn(cV,br,cT)})};d.trigger("TrackerSetup",[this])}function E(){return{push:Z}}function b(am,al){var an={};var aj,ak;for(aj=0;aj<al.length;aj++){var ah=al[aj];an[ah]=1;for(ak=0;ak<am.length;ak++){if(am[ak]&&am[ak][0]){var ai=am[ak][0];if(ah===ai){Z(am[ak]);delete am[ak];if(an[ai]>1){ad("The method "+ai+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers')
+}an[ai]++}}}}return am}var z=["addTracker","disableCookies","setTrackerUrl","setAPIUrl","enableCrossDomainLinking","setCookiePath","setCookieDomain","setDomains","setUserId","setSiteId","enableLinkTracking"];function X(ah,aj){var ai=new N(ah,aj);F.push(ai);_paq=b(_paq,z);for(B=0;B<_paq.length;B++){if(_paq[B]){Z(_paq[B])}}_paq=new E();return ai}ag(Q,"beforeunload",ab,false);Date.prototype.getTimeAlias=Date.prototype.getTime;d={initialized:false,JSON:JSON_PIWIK,DOM:{addEventListener:function(ak,aj,ai,ah){var al=typeof ah;if(al==="undefined"){ah=false}ag(ak,aj,ai,ah)},onLoad:l,onReady:o,isNodeVisible:i,isOrWasNodeVisible:t.isNodeVisible},on:function(ai,ah){if(!v[ai]){v[ai]=[]}v[ai].push(ah)},off:function(aj,ai){if(!v[aj]){return}var ah=0;for(ah;ah<v[aj].length;ah++){if(v[aj][ah]===ai){v[aj].splice(ah,1)}}},trigger:function(aj,ak,ai){if(!v[aj]){return}var ah=0;for(ah;ah<v[aj].length;ah++){v[aj][ah].apply(ai||Q,ak)}},addPlugin:function(ah,ai){a[ah]=ai},getTracker:function(ah,ai){if(!G(ai)){ai=this.getAsyncTracker().getSiteId()
+}if(!G(ah)){ah=this.getAsyncTracker().getTrackerUrl()}return new N(ah,ai)},getAsyncTrackers:function(){return F},addTracker:function(ah,ai){if(!F.length){X(ah,ai)}else{F[0].addTracker(ah,ai)}},getAsyncTracker:function(ai,al){var ak;if(F&&F.length&&F[0]){ak=F[0]}else{return X(ai,al)}if(!al&&!ai){return ak}if((!G(al)||null===al)&&ak){al=ak.getSiteId()}if((!G(ai)||null===ai)&&ak){ai=ak.getTrackerUrl()}var aj,ah=0;for(ah;ah<F.length;ah++){aj=F[ah];if(aj&&String(aj.getSiteId())===String(al)&&aj.getTrackerUrl()===ai){return aj}}},retryMissedPluginCalls:function(){var ai=aa;aa=[];var ah=0;for(ah;ah<ai.length;ah++){Z(ai[ah])}}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return d})}return d}());
/*!!! pluginTrackerHook */
-}(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.piwikPluginAsyncInit&&window.piwikPluginAsyncInit.length){var a=0;for(a;a<window.piwikPluginAsyncInit.length;a++){if(typeof window.piwikPluginAsyncInit[a]==="function"){window.piwikPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()
-}if(!window.Piwik.getAsyncTrackers().length){if(b()){window.Piwik.addTracker()}else{_paq={push:function(c){if(console!==undefined&&console&&console.error){console.error("_paq.push() was used but Piwik tracker was not initialized before the piwik.js file was loaded. Make sure to configure the tracker via _paq.push before loading piwik.js. Alternatively, you can create a tracker via Piwik.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Piwik.trigger("PiwikInitialized",[]);window.Piwik.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Piwik}}());if(typeof piwik_log!=="function"){piwik_log=function(b,f,d,g){function a(h){try{if(window["piwik_"+h]){return window["piwik_"+h]}}catch(i){}return}var c,e=window.Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");
-if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){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()}};
+}(function(){function b(){if("object"!==typeof _paq){return false}var c=typeof _paq.length;if("undefined"===c){return false}return !!_paq.length}if(window&&"object"===typeof window.piwikPluginAsyncInit&&window.piwikPluginAsyncInit.length){var a=0;for(a;
+a<window.piwikPluginAsyncInit.length;a++){if(typeof window.piwikPluginAsyncInit[a]==="function"){window.piwikPluginAsyncInit[a]()}}}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}if(!window.Piwik.getAsyncTrackers().length){if(b()){window.Piwik.addTracker()}else{_paq={push:function(c){if(console!==undefined&&console&&console.error){console.error("_paq.push() was used but Piwik tracker was not initialized before the piwik.js file was loaded. Make sure to configure the tracker via _paq.push before loading piwik.js. Alternatively, you can create a tracker via Piwik.addTracker() manually and then use _paq.push but it may not fully work as tracker methods may not be executed in the correct order.",c)}}}}}window.Piwik.trigger("PiwikInitialized",[]);window.Piwik.initialized=true}());(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=window.Piwik}}());if(typeof piwik_log!=="function"){piwik_log=function(b,f,d,g){function a(h){try{if(window["piwik_"+h]){return window["piwik_"+h]
+}}catch(i){}return}var c,e=window.Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){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()}};
/*!! @license-end */
}; \ No newline at end of file