diff --git a/priv/tracker/js/analytics.js b/priv/tracker/js/analytics.js index 98b0ec8271..7b308295e1 100644 --- a/priv/tracker/js/analytics.js +++ b/priv/tracker/js/analytics.js @@ -1 +1 @@ -!function(r,i){"use strict";var e,o=r.location,s=r.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),p=r.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return c("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver)){if("true"==p)return c("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=r.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",i+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function n(){e!==o.pathname&&(e=o.pathname,a("pageview"))}try{var u,h=r.history;h.pushState&&(u=h.pushState,h.pushState=function(){u.apply(this,arguments),n()},r.addEventListener("popstate",n));var g=r.plausible&&r.plausible.q||[];r.plausible=a;for(var f=0;f"); \ No newline at end of file +!function(r,i){"use strict";var e,o=r.location,s=r.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),p=r.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return c("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver||r.Cypress)){if("true"==p)return c("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=r.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",i+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function n(){e!==o.pathname&&(e=o.pathname,a("pageview"))}try{var u,h=r.history;h.pushState&&(u=h.pushState,h.pushState=function(){u.apply(this,arguments),n()},r.addEventListener("popstate",n));var g=r.plausible&&r.plausible.q||[];r.plausible=a;for(var f=0;f"); \ No newline at end of file diff --git a/priv/tracker/js/p.js b/priv/tracker/js/p.js index 4869d875fe..ad4e798b1d 100644 --- a/priv/tracker/js/p.js +++ b/priv/tracker/js/p.js @@ -1 +1 @@ -!function(r,a){"use strict";function o(e){console.warn("[Plausible] Ignoring event because "+e)}function l(){var e,i,t=JSON.parse((e="plausible_user",(i=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(i[1]):null));return t?{initial_referrer:t.initial_referrer&&decodeURIComponent(t.initial_referrer),initial_source:t.initial_source&&decodeURIComponent(t.initial_source)}:(t={initial_referrer:r.document.referrer||null,initial_source:getSourceFromQueryParam()},function(e,i){var t=new Date;t.setTime(t.getTime()+94608e6);var n="; expires="+t.toUTCString();document.cookie=e+"="+(i||"")+n+"; samesite=strict; path=/"}("plausible_user",JSON.stringify({initial_referrer:t.initial_referrer&&encodeURIComponent(t.initial_referrer),initial_source:t.initial_source&&encodeURIComponent(t.initial_source)})),t)}function i(e,i){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.location.hostname))return o("website is running locally");if("file:"===r.location.protocol)return o("website is running locally");if("prerender"===r.document.visibilityState)return o("document is prerendering");var t=s.trackAcquisition?l():{};t.n=e,t.u=r.location.href,t.d=s.domain,t.r=r.document.referrer||null,t.w=r.innerWidth;var n=new XMLHttpRequest;n.open("POST",a+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&i&&i.callback&&i.callback()}}function t(e){i("pageview",e)}try{var s={domain:r.location.hostname},n={page:t,trigger:i,trackPushState:function(){var e,i=r.history;i.pushState&&(e=i.pushState,i.pushState=function(){e.apply(this,arguments),t()}),r.addEventListener("popstate",t)},configure:function(e,i){s[e]=i}},e=r.plausible.q||[];r.plausible=function(){var e=[].slice.call(arguments),i=e.shift();n[i].apply(this,e)};for(var c=0;c"); \ No newline at end of file +!function(r,a){"use strict";function o(e){console.warn("[Plausible] Ignoring event because "+e)}function l(){var e,i,t,n=JSON.parse((t="plausible_user",(t=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(t[1]):null));return n?{initial_referrer:n.initial_referrer&&decodeURIComponent(n.initial_referrer),initial_source:n.initial_source&&decodeURIComponent(n.initial_source)}:(n={initial_referrer:r.document.referrer||null,initial_source:getSourceFromQueryParam()},e="plausible_user",i=JSON.stringify({initial_referrer:n.initial_referrer&&encodeURIComponent(n.initial_referrer),initial_source:n.initial_source&&encodeURIComponent(n.initial_source)}),(t=new Date).setTime(t.getTime()+94608e6),t="; expires="+t.toUTCString(),document.cookie=e+"="+(i||"")+t+"; samesite=strict; path=/",n)}function i(e,i){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(r.location.hostname))return o("website is running locally");if("file:"===r.location.protocol)return o("website is running locally");if("prerender"===r.document.visibilityState)return o("document is prerendering");var t=s.trackAcquisition?l():{};t.n=e,t.u=r.location.href,t.d=s.domain,t.r=r.document.referrer||null,t.w=r.innerWidth;var n=new XMLHttpRequest;n.open("POST",a+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(t)),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&i&&i.callback&&i.callback()}}function t(e){i("pageview",e)}try{var s={domain:r.location.hostname},n={page:t,trigger:i,trackPushState:function(){var e,i=r.history;i.pushState&&(e=i.pushState,i.pushState=function(){e.apply(this,arguments),t()}),r.addEventListener("popstate",t)},configure:function(e,i){s[e]=i}},e=r.plausible.q||[];r.plausible=function(){var e=[].slice.call(arguments),i=e.shift();n[i].apply(this,e)};for(var c=0;c"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.js b/priv/tracker/js/plausible.exclusions.js index f4f39fbada..5725392713 100644 --- a/priv/tracker/js/plausible.exclusions.js +++ b/priv/tracker/js/plausible.exclusions.js @@ -1 +1 @@ -!function(i,o){"use strict";var e,l=i.location,s=i.document,t=s.querySelector('[src*="'+o+'"]'),p=t&&t.getAttribute("data-domain"),c=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function g(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return g("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver)){if("true"==c)return g("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file +!function(i,o){"use strict";var e,s=i.location,l=i.document,t=l.querySelector('[src*="'+o+'"]'),p=t&&t.getAttribute("data-domain"),c=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function g(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(s.hostname)||"file:"===s.protocol)return g("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver||i.Cypress)){if("true"==c)return g("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.exclusions.outbound-links.js b/priv/tracker/js/plausible.exclusions.outbound-links.js index 6b8729d967..34c2f82ca5 100644 --- a/priv/tracker/js/plausible.exclusions.outbound-links.js +++ b/priv/tracker/js/plausible.exclusions.outbound-links.js @@ -1 +1 @@ -!function(n,o){"use strict";var e,l=n.location,s=n.document,t=s.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=n.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function h(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return h("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver)){if("true"==p)return h("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file +!function(n,o){"use strict";var e,s=n.location,l=n.document,t=l.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=n.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function h(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(s.hostname)||"file:"===s.protocol)return h("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver||n.Cypress)){if("true"==p)return h("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.exclusions.js b/priv/tracker/js/plausible.hash.exclusions.js index efa52f734c..adac7643f1 100644 --- a/priv/tracker/js/plausible.hash.exclusions.js +++ b/priv/tracker/js/plausible.hash.exclusions.js @@ -1 +1 @@ -!function(i,o){"use strict";var e,l=i.location,s=i.document,t=s.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function g(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return g("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver)){if("true"==p)return g("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file +!function(i,o){"use strict";var e,l=i.location,s=i.document,t=s.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function g(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return g("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver||i.Cypress)){if("true"==p)return g("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.exclusions.outbound-links.js b/priv/tracker/js/plausible.hash.exclusions.outbound-links.js index 3f854ae4a3..4d0b19a649 100644 --- a/priv/tracker/js/plausible.hash.exclusions.outbound-links.js +++ b/priv/tracker/js/plausible.hash.exclusions.outbound-links.js @@ -1 +1 @@ -!function(i,o){"use strict";var e,l=i.location,s=i.document,t=s.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function h(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return h("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver)){if("true"==p)return h("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file +!function(i,o){"use strict";var e,l=i.location,s=i.document,t=s.querySelector('[src*="'+o+'"]'),c=t&&t.getAttribute("data-domain"),p=i.localStorage.plausible_ignore,u=t&&t.getAttribute("data-exclude").split(",");function h(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(l.hostname)||"file:"===l.protocol)return h("localhost");if(!(i.phantom||i._phantom||i.__nightmare||i.navigator.webdriver||i.Cypress)){if("true"==p)return h("localStorage flag");if(u)for(var a=0;a"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.js b/priv/tracker/js/plausible.hash.js index 83501f190d..a3bb101101 100644 --- a/priv/tracker/js/plausible.hash.js +++ b/priv/tracker/js/plausible.hash.js @@ -1 +1 @@ -!function(r,i){"use strict";var e,o=r.location,l=r.document,t=l.querySelector('[src*="'+i+'"]'),s=t&&t.getAttribute("data-domain"),c=r.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver)){if("true"==c)return p("localStorage flag");var n={};n.n=e,n.u=o.href,n.d=s,n.r=l.referrer||null,n.w=r.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",i+"/api/event",!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function a(){e=o.pathname,n("pageview")}try{r.addEventListener("hashchange",a);var u=r.plausible&&r.plausible.q||[];r.plausible=n;for(var g=0;g"); \ No newline at end of file +!function(r,i){"use strict";var e,o=r.location,s=r.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),c=r.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function n(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver||r.Cypress)){if("true"==c)return p("localStorage flag");var n={};n.n=e,n.u=o.href,n.d=l,n.r=s.referrer||null,n.w=r.innerWidth,t&&t.meta&&(n.m=JSON.stringify(t.meta)),t&&t.props&&(n.p=JSON.stringify(t.props)),n.h=1;var a=new XMLHttpRequest;a.open("POST",i+"/api/event",!0),a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(n)),a.onreadystatechange=function(){4==a.readyState&&t&&t.callback&&t.callback()}}}function a(){e=o.pathname,n("pageview")}try{r.addEventListener("hashchange",a);var u=r.plausible&&r.plausible.q||[];r.plausible=n;for(var g=0;g"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.hash.outbound-links.js b/priv/tracker/js/plausible.hash.outbound-links.js index 8083122c97..5596a1a2b7 100644 --- a/priv/tracker/js/plausible.hash.outbound-links.js +++ b/priv/tracker/js/plausible.hash.outbound-links.js @@ -1 +1 @@ -!function(n,i){"use strict";var e,o=n.location,l=n.document,t=l.querySelector('[src*="'+i+'"]'),s=t&&t.getAttribute("data-domain"),c=n.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver)){if("true"==c)return p("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=s,a.r=l.referrer||null,a.w=n.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props)),a.h=1;var r=new XMLHttpRequest;r.open("POST",i+"/api/event",!0),r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(a)),r.onreadystatechange=function(){4==r.readyState&&t&&t.callback&&t.callback()}}}function r(){e=o.pathname,a("pageview")}function u(e){for(var t=e.target,a="auxclick"==e.type&&2==e.which,r="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==o.host&&((a||r)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!r||(setTimeout(function(){o.href=t.href},150),e.preventDefault()))}try{n.addEventListener("hashchange",r),l.addEventListener("click",u),l.addEventListener("auxclick",u);var h=n.plausible&&n.plausible.q||[];n.plausible=a;for(var f=0;f"); \ No newline at end of file +!function(n,i){"use strict";var e,o=n.location,s=n.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),c=n.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver||n.Cypress)){if("true"==c)return p("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=n.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props)),a.h=1;var r=new XMLHttpRequest;r.open("POST",i+"/api/event",!0),r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(a)),r.onreadystatechange=function(){4==r.readyState&&t&&t.callback&&t.callback()}}}function r(){e=o.pathname,a("pageview")}function u(e){for(var t=e.target,a="auxclick"==e.type&&2==e.which,r="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==o.host&&((a||r)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!r||(setTimeout(function(){o.href=t.href},150),e.preventDefault()))}try{n.addEventListener("hashchange",r),s.addEventListener("click",u),s.addEventListener("auxclick",u);var h=n.plausible&&n.plausible.q||[];n.plausible=a;for(var f=0;f"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.js b/priv/tracker/js/plausible.js index 98b0ec8271..7b308295e1 100644 --- a/priv/tracker/js/plausible.js +++ b/priv/tracker/js/plausible.js @@ -1 +1 @@ -!function(r,i){"use strict";var e,o=r.location,s=r.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),p=r.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return c("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver)){if("true"==p)return c("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=r.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",i+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function n(){e!==o.pathname&&(e=o.pathname,a("pageview"))}try{var u,h=r.history;h.pushState&&(u=h.pushState,h.pushState=function(){u.apply(this,arguments),n()},r.addEventListener("popstate",n));var g=r.plausible&&r.plausible.q||[];r.plausible=a;for(var f=0;f"); \ No newline at end of file +!function(r,i){"use strict";var e,o=r.location,s=r.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),p=r.localStorage.plausible_ignore;function c(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return c("localhost");if(!(r.phantom||r._phantom||r.__nightmare||r.navigator.webdriver||r.Cypress)){if("true"==p)return c("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=r.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var n=new XMLHttpRequest;n.open("POST",i+"/api/event",!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4==n.readyState&&t&&t.callback&&t.callback()}}}function n(){e!==o.pathname&&(e=o.pathname,a("pageview"))}try{var u,h=r.history;h.pushState&&(u=h.pushState,h.pushState=function(){u.apply(this,arguments),n()},r.addEventListener("popstate",n));var g=r.plausible&&r.plausible.q||[];r.plausible=a;for(var f=0;f"); \ No newline at end of file diff --git a/priv/tracker/js/plausible.outbound-links.js b/priv/tracker/js/plausible.outbound-links.js index 461e8dabed..7f9d49ba8e 100644 --- a/priv/tracker/js/plausible.outbound-links.js +++ b/priv/tracker/js/plausible.outbound-links.js @@ -1 +1 @@ -!function(n,i){"use strict";var e,o=n.location,s=n.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),c=n.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver)){if("true"==c)return p("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=n.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var r=new XMLHttpRequest;r.open("POST",i+"/api/event",!0),r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(a)),r.onreadystatechange=function(){4==r.readyState&&t&&t.callback&&t.callback()}}}function r(){e!==o.pathname&&(e=o.pathname,a("pageview"))}function u(e){for(var t=e.target,a="auxclick"==e.type&&2==e.which,r="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==o.host&&((a||r)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!r||(setTimeout(function(){o.href=t.href},150),e.preventDefault()))}try{var h,f=n.history;f.pushState&&(h=f.pushState,f.pushState=function(){h.apply(this,arguments),r()},n.addEventListener("popstate",r)),s.addEventListener("click",u),s.addEventListener("auxclick",u);var d=n.plausible&&n.plausible.q||[];n.plausible=a;for(var g=0;g"); \ No newline at end of file +!function(n,i){"use strict";var e,o=n.location,s=n.document,t=s.querySelector('[src*="'+i+'"]'),l=t&&t.getAttribute("data-domain"),c=n.localStorage.plausible_ignore;function p(e){console.warn("Ignoring Event: "+e)}function a(e,t){if(/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(o.hostname)||"file:"===o.protocol)return p("localhost");if(!(n.phantom||n._phantom||n.__nightmare||n.navigator.webdriver||n.Cypress)){if("true"==c)return p("localStorage flag");var a={};a.n=e,a.u=o.href,a.d=l,a.r=s.referrer||null,a.w=n.innerWidth,t&&t.meta&&(a.m=JSON.stringify(t.meta)),t&&t.props&&(a.p=JSON.stringify(t.props));var r=new XMLHttpRequest;r.open("POST",i+"/api/event",!0),r.setRequestHeader("Content-Type","text/plain"),r.send(JSON.stringify(a)),r.onreadystatechange=function(){4==r.readyState&&t&&t.callback&&t.callback()}}}function r(){e!==o.pathname&&(e=o.pathname,a("pageview"))}function u(e){for(var t=e.target,a="auxclick"==e.type&&2==e.which,r="click"==e.type;t&&(void 0===t.tagName||"a"!=t.tagName.toLowerCase()||!t.href);)t=t.parentNode;t&&t.href&&t.host&&t.host!==o.host&&((a||r)&&plausible("Outbound Link: Click",{props:{url:t.href}}),t.target&&!t.target.match(/^_(self|parent|top)$/i)||e.ctrlKey||e.metaKey||e.shiftKey||!r||(setTimeout(function(){o.href=t.href},150),e.preventDefault()))}try{var h,f=n.history;f.pushState&&(h=f.pushState,f.pushState=function(){h.apply(this,arguments),r()},n.addEventListener("popstate",r)),s.addEventListener("click",u),s.addEventListener("auxclick",u);var d=n.plausible&&n.plausible.q||[];n.plausible=a;for(var g=0;g"); \ No newline at end of file diff --git a/tracker/src/plausible.js b/tracker/src/plausible.js index 589c8cacd8..aff85ede58 100644 --- a/tracker/src/plausible.js +++ b/tracker/src/plausible.js @@ -23,7 +23,7 @@ {{#if exclusionMode}} if (excludedPaths) for (var i = 0; i < excludedPaths.length; i++) - if (eventName == "pageview" && location.pathname.match(new RegExp('^' + excludedPaths[i].trim().replace(/\*\*/g, '.*').replace(/[^\.]\*/g, '[^\\s\/]*') + '\/?$'))) + if (eventName == "pageview" && location.pathname.match(new RegExp('^' + excludedPaths[i].trim().replace(/\*\*/g, '.*').replace(/([^\.])\*/g, '$1[^\\s\/]*') + '\/?$'))) return warn('exclusion rule'); {{/if}}