diff options
author | Dimitri Staessens <[email protected]> | 2019-07-23 11:13:59 +0200 |
---|---|---|
committer | Dimitri Staessens <[email protected]> | 2019-07-23 11:15:56 +0200 |
commit | 4a9c288bf3852f4841a383c181c59f12fa0a5e84 (patch) | |
tree | 1dda2d82e8a4d50a4c42d3a52baf03ff2ece2391 /layouts/partials/matomo | |
parent | b2ac5d5165784277a4cec881022162f4e4e29bf9 (diff) | |
download | website-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/matomo')
-rw-r--r-- | layouts/partials/matomo/analytics.html | 4 |
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']); |