add self-hosted matomo pageview tracking
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jeffrey Paul 2020-03-28 19:56:59 -07:00
parent f129fddea9
commit 4b745db52e
2 changed files with 15 additions and 0 deletions

View File

@ -16,6 +16,7 @@
{% include "style.css" %}
</style>
{% include "matomo.html" %}
</head>
<body>

14
view/matomo.html Normal file
View File

@ -0,0 +1,14 @@
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://t.sneak.cloud/";
_paq.push(['setTrackerUrl', u+'js/']);
_paq.push(['setSiteId', '2']);
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+'js/'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="https://t.sneak.cloud/js/?idsite=2&amp;rec=1" style="border:0;" alt="" /></p></noscript>