diff --git a/tracker/src/plausible.js b/tracker/src/plausible.js
index 7c7d960fd29091f388b6a3a5e884cd1131ff5e8c..f1a58cb928752e501b266c29125b0f66711e0224 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}}