Add stats for 404 page
authorChristian Hofstaedtler <ch@grml.org>
Thu, 8 Dec 2011 22:57:31 +0000 (23:57 +0100)
committerChristian Hofstaedtler <ch@grml.org>
Thu, 8 Dec 2011 22:57:31 +0000 (23:57 +0100)
errors/404.html

index 47f32d1..826a7b9 100644 (file)
@@ -51,5 +51,20 @@ function</a>.</p> Still problems? <a href="/contact/">Contact us</a>.</p>
 href="http://wiki.grml.org/">grml-wiki</a>.</p>
 
 </div>
+
+<!-- Piwik -->
+<script type="text/javascript">
+var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.grml.org/piwik/" : "http://stats.grml.org/piwik/");
+document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
+</script><script type="text/javascript">
+try {
+      var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
+      piwikTracker.setDocumentTitle('404/URL = ' + String(document.location.pathname+document.location.search).replace(/\//g,"%2f") + '/From = ' + String(document.referrer).replace(/\//g,"%2f"));
+      piwikTracker.trackPageView();
+      piwikTracker.enableLinkTracking();
+} catch( err ) {}
+</script><noscript><p><img src="http://stats.grml.org/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript>
+<!-- End Piwik Tracking Code -->
+
 </body>
 </html>