added self-hosted matomo analytics

This commit is contained in:
Vicky Steeves 2019-01-22 17:25:26 -05:00
parent f5abe58146
commit 21da112607
1 changed files with 17 additions and 1 deletions

18
conf.py
View File

@ -1212,7 +1212,23 @@ SHOW_SOURCELINK = False
# Google Analytics or whatever else you use. Added to the bottom of <body> # Google Analytics or whatever else you use. Added to the bottom of <body>
# in the default template (base.tmpl). # in the default template (base.tmpl).
# (translatable) # (translatable)
# BODY_END = "" BODY_END = """
<!-- 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='//analytics.vickysteeves.hosting.nyu.edu/';
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '4']);
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>
<noscript><p><img src='//analytics.vickysteeves.hosting.nyu.edu/matomo.php?idsite=4&amp;rec=1' style='border:0;' alt='' /></p></noscript>
<!-- End Matomo Code -->"""
# The possibility to extract metadata from the filename by using a # The possibility to extract metadata from the filename by using a
# regular expression. # regular expression.