summaryrefslogtreecommitdiffstats
path: root/theme/javascript/core
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-14 20:33:45 +0200
committerSamy Pessé <samypesse@gmail.com>2014-04-14 20:33:45 +0200
commitf349012f0f1c087d152531c2ed5f1a92648b367f (patch)
tree37179ad45d84f4d880a95d454bafabc877be77a7 /theme/javascript/core
parentddd49509cef68f6d7cbf2c88da1272af3582ade6 (diff)
downloadgitbook-f349012f0f1c087d152531c2ed5f1a92648b367f.zip
gitbook-f349012f0f1c087d152531c2ed5f1a92648b367f.tar.gz
gitbook-f349012f0f1c087d152531c2ed5f1a92648b367f.tar.bz2
Add analytics on page changement
Diffstat (limited to 'theme/javascript/core')
-rwxr-xr-xtheme/javascript/core/navigation.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/theme/javascript/core/navigation.js b/theme/javascript/core/navigation.js
index 3136fb5..16167dc 100755
--- a/theme/javascript/core/navigation.js
+++ b/theme/javascript/core/navigation.js
@@ -1,11 +1,12 @@
define([
"jQuery",
+ "utils/analytic",
"core/state",
"core/search",
"core/progress",
"core/exercise",
"core/quiz"
-], function($, state, search, progress, exercises, quiz) {
+], function($, analytic, state, search, progress, exercises, quiz) {
var prev, next;
var githubCountStars, githubCountWatch;
@@ -98,6 +99,9 @@ define([
});
}
}
+
+ // Send to mixpanel
+ analytic.track("page.view");
};
var handlePagination = function (e) {