diff options
-rw-r--r-- | layouts/partials/matomo/analytics.html | 19 | ||||
-rw-r--r-- | themes/terrassa/layouts/partials/header.html | 1 |
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&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> |