diff --git a/tracker/src/plausible.js b/tracker/src/plausible.js index 7c7d960fd..f1a58cb92 100644 --- a/tracker/src/plausible.js +++ b/tracker/src/plausible.js @@ -33,7 +33,7 @@ function trigger(eventName, options) { - if (/^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$/.test(location.hostname) || location.protocol === 'file:') return warn('localhost'); + if (/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(location.hostname) || location.protocol === 'file:') return warn('localhost'); if (window.phantom || window._phantom || window.__nightmare || window.navigator.webdriver || window.Cypress) return; if (plausible_ignore=="true") return warn('localStorage flag') {{#if exclusions}}