summaryrefslogtreecommitdiffstats
path: root/theme/javascript/utils/analytic.js
diff options
context:
space:
mode:
Diffstat (limited to 'theme/javascript/utils/analytic.js')
-rw-r--r--theme/javascript/utils/analytic.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/theme/javascript/utils/analytic.js b/theme/javascript/utils/analytic.js
deleted file mode 100644
index f90dd95..0000000
--- a/theme/javascript/utils/analytic.js
+++ /dev/null
@@ -1,36 +0,0 @@
-define([
- "lodash"
-], function(_) {
- var isAvailable = function() {
- return (
- typeof mixpanel !== "undefined" &&
- typeof mixpanel.track === "function"
- );
- };
-
- var track = function(e, data, t) {
- if (!isAvailable()) {
- console.warn("tracking not available!");
- t = t || 500;
- setTimeout(function() {
- console.log(" -> retest tracking");
- track(e, data, t*2);
- }, t);
- return;
- }
- console.log("track", e);
- mixpanel.track(e, _.extend(data || {}, {
- 'domain': window.location.host
- }));
- };
-
- setTimeout(function() {
- mixpanel.init("01eb2b950ae09a5fdb15a98dcc5ff20e");
- track("page.start");
- }, 0);
-
- return {
- isAvailable: isAvailable,
- track: track
- };
-}); \ No newline at end of file