matomo.html 701 B

1234567891011121314151617
  1. {% if site.matomo %}
  2. <!-- Matomo -->
  3. <script type="text/javascript">
  4. var _paq = _paq || [];
  5. /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  6. _paq.push(['trackPageView']);
  7. _paq.push(['enableLinkTracking']);
  8. (function() {
  9. var u="//{{- site.matomo.uri -}}/";
  10. _paq.push(['setTrackerUrl', u+'piwik.php']);
  11. _paq.push(['setSiteId', '{{- site.matomo.site_id -}}']);
  12. var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  13. g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  14. })();
  15. </script>
  16. <!-- End Piwik Code -->
  17. {% endif %}