{% if not request.GET.disableextrascripts %}

{% if SETTINGS.PIWIK_SERVER_URL and SETTINGS.PIWIK_SITE_ID %}
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="{{ SETTINGS.PIWIK_SERVER_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>
<!-- End Piwik Code -->
{% endif %}

{% endif %}
