Skip to content

Commit

Permalink
added matomo tracking js snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
qtrinh2 authored Nov 19, 2024
1 parent 4bebdf4 commit b11972c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@
<link rel="stylesheet" href="{% static 'css/custom.css' %}" />
<script src="{% static 'js/denig.js' %}"></script>
{% block extrahead %}{% endblock extrahead %}

{% if not debug %}
<!-- Matomo -->
<script>
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://stats.rrchnm.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '117']);
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>
<!-- End Matomo Code -->
{% endif %}

</head>

<body class="font-serif">
Expand Down Expand Up @@ -128,4 +147,4 @@
</footer>
</body>

</html>
</html>

0 comments on commit b11972c

Please sign in to comment.