piwik.html 803 B

1234567891011121314151617
  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. <script type="text/javascript">
  6. var _paq = _paq || [];
  7. _paq.push(["trackPageView"]);
  8. _paq.push(["enableLinkTracking"]);
  9. (function() {
  10. var u=(("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
  11. _paq.push(["setTrackerUrl", u+"piwik.php"]);
  12. _paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
  13. var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
  14. g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  15. })();
  16. </script>
  17. {% endif %}