Add piwik analytics tool

This commit is contained in:
badele 2017-11-21 19:50:06 +01:00
parent 41667d46c3
commit 20d20a0178

View File

@ -84,4 +84,27 @@
</script> </script>
{{ end }} {{ end }}
{{ if .Site.Params.piwik }}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{{ .Site.Params.piwik.server }}/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "{{ .Site.Params.piwik.id }}"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript>
<!-- Piwik Image Tracker -->
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&amp;rec=1" style="border:0" alt="" />
<!-- End Piwik -->
</noscript>
<!-- End Piwik Code -->
{{ end }}
{{- partial "footer_custom.html" . }} {{- partial "footer_custom.html" . }}