Skip to content

Commit

Permalink
Merge pull request #208 from wiz/matomo
Browse files Browse the repository at this point in the history
Replace Google Analytics with self-hosted Matomo
  • Loading branch information
Steve Jain authored Aug 22, 2019
2 parents a74b9ce + 1e59312 commit c538283
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 c538283

Please sign in to comment.