Permalink
Browse files

add page tracking

  • Loading branch information...
1 parent 5a44397 commit af4de46807158cf51cf2a8e421c0bed8926dc063 @mislav committed Nov 27, 2012
Showing with 30 additions and 2 deletions.
  1. +13 −0 _includes/tracking_code.html
  2. +1 −0 _layouts/book.html
  3. +4 −0 index.html
  4. +8 −0 script/trackingcheck
  5. +4 −2 soundtrack/index.html
@@ -0,0 +1,13 @@
+<script>
+var _gauges = _gauges || [];
+if (/^mislav\.(uniqpath\.com|net)/.test(location.hostname)) (function() {
+ var t = document.createElement('script');
+ t.type = 'text/javascript';
+ t.async = true;
+ t.id = 'gauges-tracker';
+ t.setAttribute('data-site-id', '50b4e2ebf5a1f53e2300008b');
+ t.src = '//secure.gaug.es/track.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(t, s);
+})();
+</script>
View
@@ -13,5 +13,6 @@
{{ content }}
+{% include tracking_code.html %}
</body>
</html>
View
@@ -1,3 +1,5 @@
+---
+---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
@@ -73,5 +75,7 @@
&#0164;
<a href="soundtrack/">but the soundtrack??!</a>
</div>
+
+{% include tracking_code.html %}
</body>
</html>
@@ -0,0 +1,8 @@
+#!/bin/sh
+code="$(grep data-site-id _includes/tracking_code.html)"
+
+for html in $(find public -name '*.html' | grep -v 404); do
+ if ! grep "$code" "$html" >/dev/null; then
+ echo no tracking: $html
+ fi
+done
@@ -1,3 +1,5 @@
+---
+---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
@@ -92,6 +94,6 @@
</div>
</div>
-<script type="text/javascript" src="http://static.delicious.com/js/playtagger.js"></script>
+{% include tracking_code.html %}
</body>
-</html>
+</html>

0 comments on commit af4de46

Please sign in to comment.