feat(analytics): add Umami and Matomo tracking codes (#1658)
This commit is contained in:
parent
23be4162b3
commit
61bdca2db4
4 changed files with 27 additions and 1 deletions
|
@ -36,7 +36,7 @@
|
|||
- Built-in Search
|
||||
- Atom Feeds
|
||||
- PWA
|
||||
- Google Analytics / GoatCounter
|
||||
- Web Analytics
|
||||
- SEO & Performance Optimization
|
||||
|
||||
## Documentation
|
||||
|
|
|
@ -62,6 +62,12 @@ analytics:
|
|||
id: # fill in your Google Analytics ID
|
||||
goatcounter:
|
||||
id: # fill in your GoatCounter ID
|
||||
umami:
|
||||
id: # fill in your Umami ID
|
||||
domain: # fill in your Umami domain
|
||||
matomo:
|
||||
id: # fill in your Matomo ID
|
||||
domain: # fill in your Matomo domain
|
||||
|
||||
# Pageviews settings
|
||||
pageviews:
|
||||
|
|
14
_includes/analytics/matomo.html
Normal file
14
_includes/analytics/matomo.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!-- Matomo -->
|
||||
<script type="text/javascript">
|
||||
var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//{{ site.analytics.matomo.domain }}/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', {{ site.analytics.matomo.id }}]);
|
||||
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 -->
|
6
_includes/analytics/umami.html
Normal file
6
_includes/analytics/umami.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!-- Umami -->
|
||||
<script
|
||||
defer
|
||||
src="{{ site.analytics.umami.domain }}/script.js"
|
||||
data-website-id="{{ site.analytics.umami.id }}"
|
||||
></script>
|
Loading…
Reference in a new issue