Add support for Piwik
This commit is contained in:
parent
0553ee2619
commit
3ec493c386
2 changed files with 19 additions and 0 deletions
|
@ -17,6 +17,7 @@ A minimalist [Pelican](http://blog.getpelican.com/) theme.
|
||||||
- Disqus
|
- Disqus
|
||||||
- Google Analytics
|
- Google Analytics
|
||||||
- Google Tag Manager
|
- Google Tag Manager
|
||||||
|
- Piwik
|
||||||
- StatusCake
|
- StatusCake
|
||||||
|
|
||||||
## Need Docs?
|
## Need Docs?
|
||||||
|
|
|
@ -98,5 +98,23 @@
|
||||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script>
|
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ ADD_THIS_ID }}" async="async"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block additional_js %}{% endblock %}
|
{% block additional_js %}{% endblock %}
|
||||||
|
|
||||||
|
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||||
|
<!-- Piwik -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//{{ PIWIK_URL }}/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'piwik.php']);
|
||||||
|
_paq.push(['setSiteId', {{ PIWIK_SITE_ID }}]);
|
||||||
|
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+'piwik.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript><p><img src="//bnjbvr.alwaysdata.net/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
|
||||||
|
<!-- End Piwik Code -->
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue