Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added umami and matomo #1658

Merged
merged 4 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
- Built-in Search
- Atom Feeds
- PWA
- Google Analytics / GoatCounter
- Google Analytics / GoatCounter / Matomo / Umami
ildoc marked this conversation as resolved.
Show resolved Hide resolved
- SEO & Performance Optimization

## Documentation
Expand Down
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions _includes/analytics/matomo.html
Original file line number Diff line number Diff line change
@@ -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}}/";
ildoc marked this conversation as resolved.
Show resolved Hide resolved
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', {{site.analytics.matomo.id}}]);
ildoc marked this conversation as resolved.
Show resolved Hide resolved
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 changes: 6 additions & 0 deletions _includes/analytics/umami.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- Umami -->
<script
defer
src="{{site.analytics.umami.domain}}/script.js"
data-website-id="{{site.analytics.umami.id}}"
ildoc marked this conversation as resolved.
Show resolved Hide resolved
></script>
Loading