aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-03-16 17:45:42 +0100
committerDimitri Staessens <dimitri@ouroboros.rocks>2019-03-16 17:45:42 +0100
commitfdfe680846b7f95c6b79f5d22069c7ee04bd767f (patch)
treec883c145e4d1cee943c666abb1111b22f3bab41c
parent79acfcf1599496e67b20c39c00a100b07c383ab1 (diff)
downloadwebsite-fdfe680846b7f95c6b79f5d22069c7ee04bd767f.tar.gz
website-fdfe680846b7f95c6b79f5d22069c7ee04bd767f.zip
theme: Add support for matomo
-rw-r--r--layouts/partials/matomo/analytics.html19
-rw-r--r--themes/terrassa/layouts/partials/header.html1
2 files changed, 20 insertions, 0 deletions
diff --git a/layouts/partials/matomo/analytics.html b/layouts/partials/matomo/analytics.html
new file mode 100644
index 0000000..75a68f9
--- /dev/null
+++ b/layouts/partials/matomo/analytics.html
@@ -0,0 +1,19 @@
+<!-- Matomo -->
+<script type="text/javascript">
+ var _paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+ _paq.push(["setCookieDomain", "*.ouroboros.rocks"]);
+ _paq.push(["setDomains", ["*.ouroboros.rocks"]]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="//ouroboros.rocks/piwik/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '1']);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+ g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<noscript><p><img src="//ouroboros.rocks/piwik/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
+<!-- End Matomo Code -->
diff --git a/themes/terrassa/layouts/partials/header.html b/themes/terrassa/layouts/partials/header.html
index 73142ae..8016264 100644
--- a/themes/terrassa/layouts/partials/header.html
+++ b/themes/terrassa/layouts/partials/header.html
@@ -11,4 +11,5 @@
{{ partial "menu.html" . }}
{{ partial "hamburger-menu.html" . }}
+ {{ partial "matomo/analytics.html" . }}
</header>