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-02-21 13:41:11 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-02-21 13:41:11 +0300
commitd1cc6aa39a5b2c83a397d9ab56b00ab3d5d5fa9f (patch)
tree8f1c1bc55bcb63e417babcfc7e8186494ffc4f67 /piwik.js
parentbb35cb6761d7a492095e7f16aca79e409d7823a2 (diff)
Improvements for tracking of single page applications (#11344)
* improve single page website tracking * added docs and minified piwik * Re-generate piwik.js
Diffstat (limited to 'piwik.js')
-rw-r--r--piwik.js29
1 files changed, 15 insertions, 14 deletions
diff --git a/piwik.js b/piwik.js
index 7a1b80a91e..5cbcd0a3fa 100644
--- a/piwik.js
+++ b/piwik.js
@@ -56,20 +56,21 @@ if(cR){return{type:cR,href:cT}}}}function aF(cR,cS,cT,cU){var cV=t.buildInteract
if(cS){cV.push(cS)}}return cV}function cf(cS){var cR=t.collectContent(cS);return bh(cR,cS)}function aX(cS){if(!cS||!cS.length){return[]}var cR;for(cR=0;cR<cS.length;cR++){if(!t.isNodeVisible(cS[cR])){cS.splice(cR,1);cR--}}if(!cS||!cS.length){return[]}return cf(cS)}function ax(cT,cR,cS){var cU=t.buildImpressionRequestParams(cT,cR,cS);return b9(cU,null,"contentImpression")}function cL(cU,cS){if(!cU){return}var cR=t.findParentContentNode(cU);var cT=t.buildContentBlock(cR);if(!cT){return}if(!cS){cS="Unknown"}return aF(cS,cT.name,cT.piece,cT.target)}function cr(cS,cU,cR,cT){return"e_c="+r(cS)+"&e_a="+r(cU)+(G(cR)?"&e_n="+r(cR):"")+(G(cT)?"&e_v="+r(cT):"")}function am(cT,cV,cR,cU,cX,cW){if(String(cT).length===0||String(cV).length===0){return false}var cS=b9(cr(cT,cV,cR,cU),cX,"event");bn(cS,br,cW)}function bQ(cR,cU,cS,cV){var cT=b9("search="+r(cR)+(cU?"&search_cat="+r(cU):"")+(G(cS)?"&search_count="+cS:""),cV,"sitesearch");bn(cT,br)}function cv(cR,cU,cT){var cS=b9("idgoal="+cR+(cU?"&revenue="+cU:""),cT,"goal");
bn(cS,br)}function cC(cU,cR,cY,cX,cT){var cW=cR+"="+r(bJ(cU));var cS=cb(cT,"click",cU);if(cS){cW+="&"+cS}var cV=b9(cW,cY,"link");bn(cV,br,cX)}function bB(cS,cR){if(cS!==""){return cS+cR.charAt(0).toUpperCase()+cR.slice(1)}return cR}function bY(cW){var cV,cR,cU=["","webkit","ms","moz"],cT;if(!a1){for(cR=0;cR<cU.length;cR++){cT=cU[cR];if(Object.prototype.hasOwnProperty.call(D,bB(cT,"hidden"))){if(D[bB(cT,"visibilityState")]==="prerender"){cV=true}break}}}if(cV){ag(D,cT+"visibilitychange",function cS(){D.removeEventListener(cT+"visibilitychange",cS,false);cW()});return}cW()}function b0(cR){if(!cR){return}if(!Y.hasNodeAttribute(cR,"href")){return}var cS=Y.getAttributeValueFromNode(cR,"href");if(!cS||aK(cS)){return}cS=j(cS,an);if(cS.indexOf("?")>0){cS+="&"}else{cS+="?"}var cU=aN().uuid;var cT=aA();cS=C(cS,an,cU+cT);Y.setAnyAttribute(cR,"href",cS)}function ar(cU){var cV=Y.getAttributeValueFromNode(cU,"href");if(!cV){return false}cV=String(cV);var cS=cV.indexOf("//")===0||cV.indexOf("http://")===0||cV.indexOf("https://")===0;
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(cS){if(!ai){ai=true;var cT,cR=aP(bj,"ignore"),cU=D.links;if(cU){for(cT=0;cT<cU.length;cT++){if(!cR.test(cU[cT].className)){aj(cU[cT],cS)}}}}}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.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(cR){cI=true;
-bY(function(){o(function(){bl(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}());
+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}());
/*!!! 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