{% if settings.piwik.tracker_url and settings.piwik.site_id %}
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="{{ settings.piwik.tracker_url }}/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', {{ settings.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="{{ settings.piwik.tracker_url }}/piwik.php?idsite={{ settings.piwik.site_id }}" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endif %}
