Matomo Analytics Tracking Code
Loads the Matomo self-hosted analytics tag with page-view and link tracking.
HTMLby SnipCraft
html
<!-- Matomo — replace https://your-matomo-domain.example.com/ with your Matomo URL
and replace the setSiteId value '1' with your actual Site ID -->
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u = "https://your-matomo-domain.example.com/";
_paq.push(['setTrackerUrl', u + 'matomo.php']);
_paq.push(['setSiteId', '1']);
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>#analytics#matomo#privacy#self-hosted#tracking