piwik.html 851 B

1234567891011121314151617181920
  1. {% if PIWIK_SITE_ID and PIWIK_URL %}
  2. {% if PIWIK_SSL_URL is not defined %}
  3. {% set PIWIK_SSL_URL = PIWIK_URL %}
  4. {% endif %}
  5. <!-- Piwik -->
  6. <script type="text/javascript">
  7. var _paq = _paq || [];
  8. _paq.push(["trackPageView"]);
  9. _paq.push(["enableLinkTracking"]);
  10. (function() {
  11. var u=(("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
  12. _paq.push(["setTrackerUrl", u+"piwik.php"]);
  13. _paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
  14. var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
  15. g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  16. })();
  17. </script>
  18. <!-- End Piwik Code -->
  19. {% endif %}