mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
feat(analytics): add Umami and Matomo tracking codes (#1658)
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user