mirror of
https://github.com/imfing/hextra.git
synced 2025-08-26 03:06:50 -04:00
feat(analytics): add Umami and Matomo (#784)
This commit is contained in:

committed by
GitHub

parent
524af14bd1
commit
c149af0f74
19
layouts/_partials/components/analytics/matomo.html
Normal file
19
layouts/_partials/components/analytics/matomo.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- /*
|
||||
Matomo Analytics.
|
||||
https://developer.matomo.org/guides/tracking-javascript-guide
|
||||
*/ -}}
|
||||
|
||||
<!-- Matomo -->
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//{{ .serverURL }}/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {{ .websiteID }}]);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
Reference in New Issue
Block a user