Browse code

Add piwik include file

Cinan Rakosnik authored on 25/12/2013 at 17:05:26
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+{% if site.piwik_host_name and site.piwik_site_id %}
1
+  <script type="text/javascript">
2
+    var _paq = _paq || [];
3
+    _paq.push(["trackPageView"]);
4
+    _paq.push(["enableLinkTracking"]);
5
+    (function() {
6
+      var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{{ site.piwik_host_name }}/";
7
+      _paq.push(["setTrackerUrl", u+"piwik.php"]);
8
+      _paq.push(["setSiteId", "{{ site.piwik_site_id }}"]);
9
+      var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
10
+      g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
11
+    })();
12
+  </script>
13
+{% endif %}