Skip to content

Commit

Permalink
Move Matomo settings to config
Browse files Browse the repository at this point in the history
  • Loading branch information
joonas-somero committed Jun 24, 2024
1 parent df10934 commit 92ffd38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ callouts:
color: blue
highlight:
color: yellow

# Matomo configuration
matomo:
url: docs-design-matomo.rahtiapp.fi
site_id: 4
4 changes: 2 additions & 2 deletions _includes/matomo.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//docs-design-matomo.rahtiapp.fi/";
var u="//{{ site.matomo.url }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '4']);
_paq.push(['setSiteId', '{{ site.matomo.site_id }}']);
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);
})();
Expand Down

0 comments on commit 92ffd38

Please sign in to comment.