Skip to content

Commit

Permalink
Replace Google Analytics with self-hosted Matomo (fixes #191)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Aug 22, 2019
1 parent fcab93c commit 1e59312
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -767,18 +767,21 @@
{% endif %}


<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-104074395-1', 'auto');
{% if page.url == '/404.html' %}
ga('send', 'pageview', '/404error/?url=' + document.location.pathname + document.location.search + '&ref=' + document.referrer );
{% else %}
ga('send', 'pageview');
{% endif %}
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.bisq.network/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

</body>
</html>

0 comments on commit 1e59312

Please sign in to comment.