added self-hosted matomo analytics

This commit is contained in:
Vicky Steeves 2019-01-22 17:28:28 -05:00
parent 708f26f2ef
commit a587aab215
1 changed files with 18 additions and 1 deletions

19
conf.py
View File

@ -1221,7 +1221,24 @@ INDEX_DISPLAY_POST_COUNT = 6
# 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', '2']);
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=2&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.