aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-07-23 11:13:59 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2019-07-23 11:15:56 +0200
commit4a9c288bf3852f4841a383c181c59f12fa0a5e84 (patch)
tree1dda2d82e8a4d50a4c42d3a52baf03ff2ece2391 /layouts/partials
parentb2ac5d5165784277a4cec881022162f4e4e29bf9 (diff)
downloadwebsite-4a9c288bf3852f4841a383c181c59f12fa0a5e84.tar.gz
website-4a9c288bf3852f4841a383c181c59f12fa0a5e84.zip
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.
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/matomo/analytics.html4
1 files changed, 4 insertions, 0 deletions
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']);