From 4a9c288bf3852f4841a383c181c59f12fa0a5e84 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 23 Jul 2019 11:13:59 +0200 Subject: partials: Don't log local activity to matomo The analytics would also register the activity when doing local builds while developing, which is now fixed. --- layouts/partials/matomo/analytics.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'layouts') diff --git a/layouts/partials/matomo/analytics.html b/layouts/partials/matomo/analytics.html index 75a68f9..59c75b7 100644 --- a/layouts/partials/matomo/analytics.html +++ b/layouts/partials/matomo/analytics.html @@ -8,6 +8,10 @@ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { + if (window.location.hostname === "localhost") { + console.log("Analytics not running on local dev."); + return; + } var u="//ouroboros.rocks/piwik/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '1']); -- cgit v1.2.3