mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-19 12:18:51 +00:00
WIP(analytics): Remove Mixpanel
This commit is contained in:
parent
3c5ae80e0b
commit
86d711bb5e
2 changed files with 9 additions and 9 deletions
|
|
@ -137,7 +137,7 @@ describe('Analytics Service', function () {
|
|||
});
|
||||
});
|
||||
|
||||
context('Mixpanel', function() {
|
||||
context.skip('Mixpanel', function() { // Mixpanel not currently in use
|
||||
|
||||
before(function() {
|
||||
sinon.stub(mixpanel, 'alias');
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function analyticsFactory(User) {
|
|||
}, window['ga'].l = 1 * new Date();
|
||||
ga('create', window.env.GA_ID, 'auto');
|
||||
|
||||
// Mixpanel
|
||||
/* Mixpanel - BROKEN
|
||||
(function(b) {
|
||||
if (!b.__SV) {
|
||||
var i, g;
|
||||
|
|
@ -64,7 +64,7 @@ function analyticsFactory(User) {
|
|||
b.__SV = 1.2;
|
||||
}
|
||||
})(window.mixpanel || []);
|
||||
mixpanel.init(window.env.MIXPANEL_TOKEN);
|
||||
mixpanel.init(window.env.MIXPANEL_TOKEN); */
|
||||
|
||||
function loadScripts() {
|
||||
// Amplitude
|
||||
|
|
@ -82,25 +82,25 @@ function analyticsFactory(User) {
|
|||
a.src = '//www.google-analytics.com/analytics.js';
|
||||
m.parentNode.insertBefore(a, m);
|
||||
|
||||
// Mixpanel
|
||||
/* Mixpanel
|
||||
var g = document.createElement("script");
|
||||
var e = document.getElementsByTagName("script")[0];
|
||||
g.type = "text/javascript";
|
||||
g.async = !0;
|
||||
g.src = "undefined" !== typeof MIXPANEL_CUSTOM_LIB_URL ? MIXPANEL_CUSTOM_LIB_URL : "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";
|
||||
e.parentNode.insertBefore(g, e);
|
||||
e.parentNode.insertBefore(g, e); */
|
||||
}
|
||||
|
||||
function register() {
|
||||
amplitude.setUserId(user._id);
|
||||
ga('set', {'userId':user._id});
|
||||
mixpanel.alias(user._id);
|
||||
// mixpanel.alias(user._id);
|
||||
}
|
||||
|
||||
function login() {
|
||||
amplitude.setUserId(user._id);
|
||||
ga('set', {'userId':user._id});
|
||||
mixpanel.identify(user._id);
|
||||
// mixpanel.identify(user._id);
|
||||
}
|
||||
|
||||
function track(properties) {
|
||||
|
|
@ -114,7 +114,7 @@ function analyticsFactory(User) {
|
|||
}
|
||||
|
||||
amplitude.logEvent(properties.eventAction,properties);
|
||||
mixpanel.track(properties.eventAction,properties);
|
||||
// mixpanel.track(properties.eventAction,properties);
|
||||
ga('send',properties);
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ function analyticsFactory(User) {
|
|||
|
||||
amplitude.setUserProperties(properties);
|
||||
ga('set',properties);
|
||||
mixpanel.register(properties);
|
||||
// mixpanel.register(properties);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue