Skip to content

Commit

Permalink
feat: add tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
hteumeuleu committed Aug 29, 2024
1 parent 361fd88 commit a81e781
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script defer>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://piwik.tilt-studio.net/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '3']);
_paq.push(['HeatmapSessionRecording::disable']);
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);
})();
</script>
4 changes: 4 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<link href="{{ site.url }}/feed.xml" rel="alternate" type="application/atom+xml" />
<meta name="color-scheme" content="dark" />
<link rel="me" href="https://mastodon.social/@caniemail" />
<meta http-equiv="content-security-policy" content="script-src 'self' 'unsafe-inline' https://piwik.tilt-studio.net; base-uri 'self';" />
</head>
<body>
<div class="caniemail{{ page.name | remove: '.html' | slugify | default: 'default' | prepend: ' page--' }}">
Expand All @@ -37,5 +38,8 @@
{% include footer.html %}
</div>
<script src="/assets/js/caniemail.js" defer></script>
{% if jekyll.environment == 'production' %}
{% include analytics.html %}
{% endif %}
</body>
</html>

0 comments on commit a81e781

Please sign in to comment.