(sitka) adding piwik tracking to the catalogue
authorkreed <kreed@sitka.bclibraries.ca>
Wed, 11 Dec 2013 21:53:41 +0000 (13:53 -0800)
committerkreed <kreed@sitka.bclibraries.ca>
Wed, 11 Dec 2013 21:53:41 +0000 (13:53 -0800)
Open-ILS/src/templates/opac/parts/goog_analytics.tt2

index ce1e1ae..d19c644 100644 (file)
     })();
 </script>
 [%- END %]
+
+<!-- Piwik -->
+<script type="text/javascript">
+  var _paq = _paq || [];
+  _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+  _paq.push(["setCustomVariable", 1, "url", document.URL, "page"]);
+  _paq.push(["setCustomVariable", 2, "shortcode", [%- ENV.shortname -%], "page"];
+  _paq.push(["trackPageView"]);
+  _paq.push(["enableLinkTracking"]);
+
+  (function() {
+    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.libraries.coop/piwik/";
+    _paq.push(["setTrackerUrl", u+"piwik.php"]);
+    _paq.push(["setSiteId", "9"]);
+    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><p><img src="https://piwik.libraries.coop/piwik/piwik.php?idsite=9&amp;rec=1" style="border:0" alt="" /></p></noscript>
+<!-- End Piwik -->