Added matomo support (#633)
This commit is contained in:
parent
55dd90a0dd
commit
eefb6166eb
2 changed files with 19 additions and 0 deletions
|
@ -34,6 +34,7 @@ A [Hugo](https://gohugo.io/) theme for a personal portfolio with minimalist desi
|
||||||
- GoatCounter
|
- GoatCounter
|
||||||
- counter.dev
|
- counter.dev
|
||||||
- Google Analytics
|
- Google Analytics
|
||||||
|
- Matomo/Piwik
|
||||||
- Comment Support
|
- Comment Support
|
||||||
- [Disqus](https://disqus.com/)
|
- [Disqus](https://disqus.com/)
|
||||||
- [Valine](https://valine.js.org/)
|
- [Valine](https://valine.js.org/)
|
||||||
|
|
|
@ -40,6 +40,24 @@
|
||||||
src="//gc.zgo.at/count.js"
|
src="//gc.zgo.at/count.js"
|
||||||
></script>
|
></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- Piwik/Matomo -->
|
||||||
|
{{ with .matomo }}
|
||||||
|
<!-- Matomo -->
|
||||||
|
<script>
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//{{ .instance }}/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '{{ .siteId }}']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue