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
path: root/js
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2022-07-14 09:54:01 +0300
committerGitHub <noreply@github.com>2022-07-14 09:54:01 +0300
commitaa9425ff2b20a43004576183425047c3fa21d2ad (patch)
treef4b25677a57446f44d6b1d41f026a60bc63df416 /js
parent87e5fb10874b813ec42f43350fd28d99f8f1aded (diff)
Exclude .paypal.com as referrer by default (#19516)
* Exclude .paypal.com as referrer by default * update tests
Diffstat (limited to 'js')
-rw-r--r--js/piwik.js2
-rw-r--r--js/piwik.min.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/js/piwik.js b/js/piwik.js
index 29741749b3..5af350389b 100644
--- a/js/piwik.js
+++ b/js/piwik.js
@@ -2250,7 +2250,7 @@ if (typeof window.Matomo !== 'object') {
configIgnoreClasses = [],
// Referrer URLs that should be excluded
- configExcludedReferrers = [],
+ configExcludedReferrers = ['.paypal.com'],
// Query parameters to be excluded
configExcludedQueryParams = [],
diff --git a/js/piwik.min.js b/js/piwik.min.js
index c687c590e6..001583932d 100644
--- a/js/piwik.min.js
+++ b/js/piwik.min.js
@@ -29,7 +29,7 @@ at=ai.findFirstNodeHavingAttribute(au,this.CONTENT_PIECE_ATTR);if(!at){at=ai.fin
}if(aw){aw+="&ca=1"}return aw},buildContentBlock:function(av){if(!av){return}var at=this.findContentName(av);var au=this.findContentPiece(av);var aw=this.findContentTarget(av);at=this.trim(at);au=this.trim(au);aw=this.trim(aw);return{name:at||"Unknown",piece:au||"Unknown",target:aw||""}},collectContent:function(aw){if(!aw||!aw.length){return[]}var av=[];var at,au;for(at=0;at<aw.length;at++){au=this.buildContentBlock(aw[at]);if(M(au)){av.push(au)}}return av},setLocation:function(at){this.location=at},getLocation:function(){var at=this.location||W.location;if(!at.origin){at.origin=at.protocol+"//"+at.hostname+(at.port?":"+at.port:"")}return at},toAbsoluteUrl:function(au){if((!au||String(au)!==au)&&au!==""){return au}if(""===au){return this.getLocation().href}if(au.search(/^\/\//)!==-1){return this.getLocation().protocol+au}if(au.search(/:\/\//)!==-1){return au}if(0===au.indexOf("#")){return this.getLocation().origin+this.getLocation().pathname+au}if(0===au.indexOf("?")){return this.getLocation().origin+this.getLocation().pathname+au
}if(0===au.search("^[a-zA-Z]{2,11}:")){return au}if(au.search(/^\//)!==-1){return this.getLocation().origin+au}var at="(.*/)";var av=this.getLocation().origin+this.getLocation().pathname.match(new RegExp(at))[0];return av+au},isUrlToCurrentDomain:function(au){var av=this.toAbsoluteUrl(au);if(!av){return false}var at=this.getLocation().origin;if(at===av){return true}if(0===String(av).indexOf(at)){if(":"===String(av).substr(at.length,1)){return false}return true}return false},setHrefAttribute:function(au,at){if(!au||!at){return}ai.setAnyAttribute(au,"href",at)},shouldIgnoreInteraction:function(at){if(ai.hasNodeAttribute(at,this.CONTENT_IGNOREINTERACTION_ATTR)){return true}if(ai.hasNodeCssClass(at,this.CONTENT_IGNOREINTERACTION_CLASS)){return true}if(ai.hasNodeCssClass(at,this.LEGACY_CONTENT_IGNOREINTERACTION_CLASS)){return true}return false}};function aa(au,ax){if(ax){return ax}au=w.toAbsoluteUrl(au);if(A(au,"?")){var aw=au.indexOf("?");au=au.slice(0,aw)}if(U(au,"matomo.php")){au=f(au,"matomo.php".length)
}else{if(U(au,"piwik.php")){au=f(au,"piwik.php".length)}else{if(U(au,".php")){var at=au.lastIndexOf("/");var av=1;au=au.slice(0,at+av)}}}if(U(au,"/js/")){au=f(au,"js/".length)}return au}function R(az){var aB="Matomo_Overlay";var au=new RegExp("index\\.php\\?module=Overlay&action=startOverlaySession&idSite=([0-9]+)&period=([^&]+)&date=([^&]+)(&segment=[^&]*)?");var av=au.exec(J.referrer);if(av){var ax=av[1];if(ax!==String(az)){return false}var ay=av[2],at=av[3],aw=av[4];if(!aw){aw=""}else{if(aw.indexOf("&segment=")===0){aw=aw.substr("&segment=".length)}}W.name=aB+"###"+ay+"###"+at+"###"+aw}var aA=W.name.split("###");return aA.length===4&&aA[0]===aB}function ad(au,az,av){var ay=W.name.split("###"),ax=ay[1],at=ay[2],aw=ay[3],aA=aa(au,az);o(aA+"plugins/Overlay/client/client.js?v=1",function(){Matomo_Overlay_Client.initialize(aA,av,ax,at,aw)})}function v(){var av;try{av=W.frameElement}catch(au){return true}if(M(av)){return(av&&String(av.nodeName).toLowerCase()==="iframe")?true:false}try{return W.self!==W.top
-}catch(at){return true}}function T(co,ci){var bR=this,bk="mtm_consent",cT="mtm_cookie_consent",c2="mtm_consent_removed",cd=ae(J.domain,W.location.href,N()),da=O(cd[0]),bW=p(cd[1]),bw=p(cd[2]),c8=false,cs="GET",dt=cs,aM="application/x-www-form-urlencoded; charset=UTF-8",cL=aM,aI=co||"",bQ="",dh="",cy="",cf=ci||"",bH="",bX="",bb,bq="",dp=["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","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],aC=[da],bI=[],cM=[],ct=[],bU=[],bf=[],bS=500,dd=true,cZ,bc,b0,bY,at,cC=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bP=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],br="_pk_",az="pk_vid",a6=180,df,by,b1=false,aN="Lax",bt=false,c6,bl,bE,c0=33955200000,cz=1800000,dn=15768000000,a9=true,bN=false,bo=false,bZ=false,aV=false,cl,b5={},cx={},bv={},bC=200,cH={},di={},dq={},aZ={},cj=[],bu=false,ck=[],cp=false,cR=false,au=false,dr=false,c3=false,aS=false,bj=v(),cN=null,dg=null,aW,bK,cg=aq,bx,aQ,bJ=false,cE=0,bD=["id","ses","cvar","ref"],cQ=false,bL=null,c1=[],cG=[],aB=X++,aA=false,de=true;
+}catch(at){return true}}function T(co,ci){var bR=this,bk="mtm_consent",cT="mtm_cookie_consent",c2="mtm_consent_removed",cd=ae(J.domain,W.location.href,N()),da=O(cd[0]),bW=p(cd[1]),bw=p(cd[2]),c8=false,cs="GET",dt=cs,aM="application/x-www-form-urlencoded; charset=UTF-8",cL=aM,aI=co||"",bQ="",dh="",cy="",cf=ci||"",bH="",bX="",bb,bq="",dp=["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","rtf","sea","sit","tar","tbz","tbz2","bz","bz2","tgz","torrent","txt","wav","wma","wmv","wpd","xls","xlsx","xml","z","zip"],aC=[da],bI=[],cM=[".paypal.com"],ct=[],bU=[],bf=[],bS=500,dd=true,cZ,bc,b0,bY,at,cC=["pk_campaign","mtm_campaign","piwik_campaign","matomo_campaign","utm_campaign","utm_source","utm_medium"],bP=["pk_kwd","mtm_kwd","piwik_kwd","matomo_kwd","utm_term"],br="_pk_",az="pk_vid",a6=180,df,by,b1=false,aN="Lax",bt=false,c6,bl,bE,c0=33955200000,cz=1800000,dn=15768000000,a9=true,bN=false,bo=false,bZ=false,aV=false,cl,b5={},cx={},bv={},bC=200,cH={},di={},dq={},aZ={},cj=[],bu=false,ck=[],cp=false,cR=false,au=false,dr=false,c3=false,aS=false,bj=v(),cN=null,dg=null,aW,bK,cg=aq,bx,aQ,bJ=false,cE=0,bD=["id","ses","cvar","ref"],cQ=false,bL=null,c1=[],cG=[],aB=X++,aA=false,de=true;
try{bq=J.title}catch(cO){bq=""}function aH(dE){if(bt&&dE!==c2){return 0}var dC=new RegExp("(^|;)[ ]*"+dE+"=([^;]*)"),dD=dC.exec(J.cookie);return dD?V(dD[2]):0}bL=!aH(c2);function dx(dG,dH,dK,dJ,dE,dF,dI){if(bt&&dG!==c2){return}var dD;if(dK){dD=new Date();dD.setTime(dD.getTime()+dK)}if(!dI){dI="Lax"}J.cookie=dG+"="+t(dH)+(dK?";expires="+dD.toGMTString():"")+";path="+(dJ||"/")+(dE?";domain="+dE:"")+(dF?";secure":"")+";SameSite="+dI;if((!dK||dK>=0)&&aH(dG)!==String(dH)){var dC="There was an error setting cookie `"+dG+"`. Please check domain and path.";ao(dC)}}function cb(dC){var dE,dD;dC=j(dC,az);dC=j(dC,"ignore_referrer");dC=j(dC,"ignore_referer");for(dD=0;dD<ct.length;dD++){dC=j(dC,ct[dD])}if(bY){dE=new RegExp("#.*");return dC.replace(dE,"")}return dC}function b4(dE,dC){var dF=s(dC),dD;if(dF){return dC}if(dC.slice(0,1)==="/"){return s(dE)+"://"+d(dE)+dC}dE=cb(dE);dD=dE.indexOf("?");if(dD>=0){dE=dE.slice(0,dD)}dD=dE.lastIndexOf("/");if(dD!==dE.length-1){dE=dE.slice(0,dD+1)}return dE+dC}function cX(dE,dC){var dD;
dE=String(dE).toLowerCase();dC=String(dC).toLowerCase();if(dE===dC){return true}if(dC.slice(0,1)==="."){if(dE===dC.slice(1)){return true}dD=dE.length-dC.length;if((dD>0)&&(dE.slice(dD)===dC)){return true}}return false}function cw(dC){var dD=document.createElement("a");if(dC.indexOf("//")!==0&&dC.indexOf("http")!==0){if(dC.indexOf("*")===0){dC=dC.substr(1)}if(dC.indexOf(".")===0){dC=dC.substr(1)}dC="http://"+dC}dD.href=w.toAbsoluteUrl(dC);if(dD.pathname){return dD.pathname}return""}function ba(dD,dC){if(!an(dC,"/")){dC="/"+dC}if(!an(dD,"/")){dD="/"+dD}var dE=(dC==="/"||dC==="/*");if(dE){return true}if(dD===dC){return true}dC=String(dC).toLowerCase();dD=String(dD).toLowerCase();if(U(dC,"*")){dC=dC.slice(0,-1);dE=(!dC||dC==="/");if(dE){return true}if(dD===dC){return true}return dD.indexOf(dC)===0}if(!U(dD,"/")){dD+="/"}if(!U(dC,"/")){dC+="/"}return dD.indexOf(dC)===0}function aw(dG,dI){var dD,dC,dE,dF,dH;for(dD=0;dD<aC.length;dD++){dF=O(aC[dD]);dH=cw(aC[dD]);if(cX(dG,dF)&&ba(dI,dH)){return true
}}return false}function a2(dF){var dD,dC,dE;for(dD=0;dD<aC.length;dD++){dC=O(aC[dD].toLowerCase());if(dF===dC){return true}if(dC.slice(0,1)==="."){if(dF===dC.slice(1)){return true}dE=dF.length-dC.length;if((dE>0)&&(dF.slice(dE)===dC)){return true}}}return false}function cD(dC){var dD,dF,dH,dE,dG;if(!dC.length||!cM.length){return false}dF=d(dC);dH=cw(dC);if(dF.indexOf("www.")===0){dF=dF.substr(4)}for(dD=0;dD<cM.length;dD++){dE=O(cM[dD]);dG=cw(cM[dD]);if(dE.indexOf("www.")===0){dE=dE.substr(4)}if(cX(dF,dE)&&ba(dH,dG)){return true}}return false}function cA(dC,dE){dC=dC.replace("send_image=0","send_image=1");var dD=new Image(1,1);dD.onload=function(){H=0;if(typeof dE==="function"){dE({request:dC,trackerUrl:aI,success:true})}};dD.onerror=function(){if(typeof dE==="function"){dE({request:dC,trackerUrl:aI,success:false})}};dD.src=aI+(aI.indexOf("?")<0?"?":"&")+dC}function cU(dC){if(dt==="POST"){return true}return dC&&(dC.length>2000||dC.indexOf('{"requests"')===0)}function aP(){return"object"===typeof g&&"function"===typeof g.sendBeacon&&"function"===typeof Blob