Added support for PIWIK

This commit is contained in:
Luca Chiricozzi 2015-01-08 18:10:38 +01:00
parent 3135426618
commit 6750ce96d0

View File

@ -1,3 +1,18 @@
{% if PIWIK_URL and PIWIK_SITE_ID %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
(function(){ var u=(("https:" == document.location.protocol) ? "https://{{ PIWIK_URL }}/" : "http://{{ PIWIK_URL }}/");
_paq.push(['setSiteId', {{ PIWIK_SITE_ID }}]);
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'piwik.js';
s.parentNode.insertBefore(g,s); })();
</script>
<!-- End Piwik Code -->
{% endif %}
{% if GOOGLE_ANALYTICS %}
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=