From 350ee3110748eed64565bdfe8afd5dc6cbe3641d Mon Sep 17 00:00:00 2001
From: Vojta Jina
Date: Wed, 25 May 2011 14:00:12 +0200
Subject: Google Analytics - basic page tracking for docs
---
docs/src/templates/docs.js | 3 ++-
docs/src/templates/index.html | 13 +++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
(limited to 'docs/src')
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
index 47d294c3..244ccce1 100644
--- a/docs/src/templates/docs.js
+++ b/docs/src/templates/docs.js
@@ -47,7 +47,8 @@ function DocsController($location, $browser, $window) {
this.afterPartialLoaded = function() {
SyntaxHighlighter.highlight();
- window.scrollTo(0,0);
+ $window.scrollTo(0,0);
+ $window._gaq.push(['_trackPageview', $location.hashPath.replace('!', '/')]);
};
this.getFeedbackUrl = function() {
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index 117723b2..9bdf977b 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -9,6 +9,10 @@