Merge pull request #763 from msgmaxim/remove-stats

Remove mixpanel
pull/778/head
Maxim Shishmarev 5 years ago committed by GitHub
commit 02999fa3f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -575,7 +575,6 @@
<script type='text/javascript' src='js/views/session_registration_view.js'></script> <script type='text/javascript' src='js/views/session_registration_view.js'></script>
<script type='text/javascript' src='js/views/app_view.js'></script> <script type='text/javascript' src='js/views/app_view.js'></script>
<script type='text/javascript' src='js/views/import_view.js'></script> <script type='text/javascript' src='js/views/import_view.js'></script>
<script type='text/javascript' src='js/views/clear_data_view.js'></script>
<script type='text/javascript' src='js/views/device_pairing_dialog_view.js'></script> <script type='text/javascript' src='js/views/device_pairing_dialog_view.js'></script>
<script type='text/javascript' src='js/views/device_pairing_words_dialog_view.js'></script> <script type='text/javascript' src='js/views/device_pairing_words_dialog_view.js'></script>
<script type='text/javascript' src='js/views/create_group_dialog_view.js'></script> <script type='text/javascript' src='js/views/create_group_dialog_view.js'></script>

@ -256,8 +256,7 @@
window.getDefaultFileServer() window.getDefaultFileServer()
); );
} }
// are there limits on tracking, is this unneeded?
// window.mixpanel.track("Desktop boot");
window.initialisedAPI = true; window.initialisedAPI = true;
if (storage.get('isSecondaryDevice')) { if (storage.get('isSecondaryDevice')) {

@ -1666,7 +1666,6 @@ class LokiPublicChannelAPI {
objBody: payload, objBody: payload,
}); });
if (!res.err && res.response) { if (!res.err && res.response) {
window.mixpanel.track('Public Message Sent');
return res.response.data.id; return res.response.data.id;
} }
if (res.err) { if (res.err) {
@ -1681,7 +1680,6 @@ class LokiPublicChannelAPI {
} }
// there's no retry on desktop // there's no retry on desktop
// this is supposed to be after retries // this is supposed to be after retries
window.mixpanel.track('Failed to Send Public Message');
return false; return false;
} }
} }

@ -133,7 +133,6 @@ class LokiMessageAPI {
try { try {
// eslint-disable-next-line more/no-then // eslint-disable-next-line more/no-then
success = await firstTrue(promises); success = await firstTrue(promises);
window.mixpanel.track('Sent Message Using Swarm API');
} catch (e) { } catch (e) {
if (e instanceof textsecure.WrongDifficultyError) { if (e instanceof textsecure.WrongDifficultyError) {
// Force nonce recalculation // Force nonce recalculation
@ -147,7 +146,6 @@ class LokiMessageAPI {
throw e; throw e;
} }
if (!success) { if (!success) {
window.mixpanel.track('Failed to Send Message Using Swarm API');
throw new window.textsecure.EmptySwarmError( throw new window.textsecure.EmptySwarmError(
pubKey, pubKey,
'Ran out of swarm nodes to query' 'Ran out of swarm nodes to query'
@ -221,7 +219,6 @@ class LokiMessageAPI {
} catch (e) { } catch (e) {
log.warn('Loki send message:', e); log.warn('Loki send message:', e);
if (e instanceof textsecure.WrongSwarmError) { if (e instanceof textsecure.WrongSwarmError) {
window.mixpanel.track('Migrated Snode');
const { newSwarm } = e; const { newSwarm } = e;
await lokiSnodeAPI.updateSwarmNodes(params.pubKey, newSwarm); await lokiSnodeAPI.updateSwarmNodes(params.pubKey, newSwarm);
this.sendingData[params.timestamp].swarm = newSwarm; this.sendingData[params.timestamp].swarm = newSwarm;

@ -1,12 +0,0 @@
const Mixpanel = require('mixpanel');
class LokiMixpanelAPI {
constructor() {
this.mixpanel = Mixpanel.init('736cd9a854a157591153efacd1164e9a');
}
track(label) {
this.mixpanel.track(label);
}
}
module.exports = LokiMixpanelAPI;

@ -64,7 +64,6 @@ class LokiSnodeAPI {
})); }));
} catch (e) { } catch (e) {
log.warn('initialiseRandomPool error', JSON.stringify(e)); log.warn('initialiseRandomPool error', JSON.stringify(e));
window.mixpanel.track('Seed Node Failed');
if (seedNodes.length === 0) { if (seedNodes.length === 0) {
throw new window.textsecure.SeedNodeError( throw new window.textsecure.SeedNodeError(
'Failed to contact seed node' 'Failed to contact seed node'
@ -80,7 +79,6 @@ class LokiSnodeAPI {
const filteredNodes = swarmNodes.filter( const filteredNodes = swarmNodes.filter(
node => node.address !== nodeUrl && node.ip !== nodeUrl node => node.address !== nodeUrl && node.ip !== nodeUrl
); );
window.mixpanel.track('Unreachable Snode');
await conversation.updateSwarmNodes(filteredNodes); await conversation.updateSwarmNodes(filteredNodes);
} }

@ -327,8 +327,6 @@
$target.toggleClass('section-toggle-visible'); $target.toggleClass('section-toggle-visible');
}, },
async openConversation(id, messageId) { async openConversation(id, messageId) {
const conversationExists = await ConversationController.get(id);
// If we call this to create a new conversation, it can only be private // If we call this to create a new conversation, it can only be private
// (group conversations are created elsewhere) // (group conversations are created elsewhere)
const conversation = await ConversationController.getOrCreateAndWait( const conversation = await ConversationController.getOrCreateAndWait(
@ -341,19 +339,6 @@
} }
if (conversation) { if (conversation) {
if (conversation.isRss()) {
window.mixpanel.track('RSS Feed Opened');
}
if (conversation.isPublic()) {
window.mixpanel.track('Loki Public Chat Opened');
}
if (conversation.isPrivate()) {
if (conversation.isMe()) {
window.mixpanel.track('Note To Self Opened');
} else if (conversationExists) {
window.mixpanel.track('Conversation Opened');
}
}
conversation.updateProfileName(); conversation.updateProfileName();
} }

@ -25,9 +25,6 @@
(function() { (function() {
window.textsecure = window.textsecure || {}; window.textsecure = window.textsecure || {};
// set up mixpanel
window.mixpanel = window.mixpanel || new window.LokiMixpanelAPI();
const ARCHIVE_AGE = 7 * 24 * 60 * 60 * 1000; const ARCHIVE_AGE = 7 * 24 * 60 * 60 * 1000;
function AccountManager(username, password) { function AccountManager(username, password) {
@ -142,10 +139,8 @@
).toArrayBuffer(); ).toArrayBuffer();
return libsignal.Curve.async.createKeyPair(privKey); return libsignal.Curve.async.createKeyPair(privKey);
}; };
window.mixpanel.track('Seed Restored');
} else { } else {
generateKeypair = libsignal.KeyHelper.generateIdentityKeyPair; generateKeypair = libsignal.KeyHelper.generateIdentityKeyPair;
window.mixpanel.track('Seed Created');
} }
return this.queueTask(() => return this.queueTask(() =>
generateKeypair().then(async identityKeyPair => generateKeypair().then(async identityKeyPair =>

@ -98,7 +98,6 @@
"libsodium-wrappers": "^0.7.4", "libsodium-wrappers": "^0.7.4",
"linkify-it": "2.0.3", "linkify-it": "2.0.3",
"lodash": "4.17.11", "lodash": "4.17.11",
"mixpanel": "^0.10.2",
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"moment": "2.21.0", "moment": "2.21.0",
"mustache": "2.3.0", "mustache": "2.3.0",

@ -371,10 +371,6 @@ window.LokiFileServerAPI = require('./js/modules/loki_file_server_api');
window.LokiRssAPI = require('./js/modules/loki_rss_api'); window.LokiRssAPI = require('./js/modules/loki_rss_api');
const LokiMixpanelAPI = require('./js/modules/loki_mixpanel.js');
window.mixpanel = new LokiMixpanelAPI();
window.localServerPort = config.localServerPort; window.localServerPort = config.localServerPort;
window.mnemonic = require('./libloki/modules/mnemonic'); window.mnemonic = require('./libloki/modules/mnemonic');

@ -550,7 +550,6 @@
<script type='text/javascript' src='../js/views/last_seen_indicator_view.js' data-cover></script> <script type='text/javascript' src='../js/views/last_seen_indicator_view.js' data-cover></script>
<script type='text/javascript' src='../js/views/scroll_down_button_view.js' data-cover></script> <script type='text/javascript' src='../js/views/scroll_down_button_view.js' data-cover></script>
<script type='text/javascript' src='../js/views/banner_view.js' data-cover></script> <script type='text/javascript' src='../js/views/banner_view.js' data-cover></script>
<script type='text/javascript' src='../js/views/clear_data_view.js'></script>
<script type='text/javascript' src='../js/views/conversation_loading_view.js'></script> <script type='text/javascript' src='../js/views/conversation_loading_view.js'></script>
<script type='text/javascript' src='../js/views/create_group_dialog_view.js'></script> <script type='text/javascript' src='../js/views/create_group_dialog_view.js'></script>

@ -1976,7 +1976,7 @@ combined-stream@1.0.6:
dependencies: dependencies:
delayed-stream "~1.0.0" delayed-stream "~1.0.0"
combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.5, combined-stream@~1.0.6:
version "1.0.8" version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
@ -4763,14 +4763,6 @@ https-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
https-proxy-agent@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97"
integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ==
dependencies:
agent-base "^4.3.0"
debug "^3.1.0"
https-proxy-agent@^2.2.1: https-proxy-agent@^2.2.1:
version "2.2.4" version "2.2.4"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b"
@ -6399,13 +6391,6 @@ mixin-deep@^1.2.0:
for-in "^1.0.2" for-in "^1.0.2"
is-extendable "^1.0.1" is-extendable "^1.0.1"
mixpanel@^0.10.2:
version "0.10.3"
resolved "https://registry.yarnpkg.com/mixpanel/-/mixpanel-0.10.3.tgz#2dff3bc0e17b57d6365547d315cbbf3ecfdb8a00"
integrity sha512-wIYr5o+1XSzJ80o3QED35K/yfPAKi5FigZXTSfcs4vltfeKbilIjNgwxdno7LrqzhjoSjmIyDWkI7D3lr7TwDw==
dependencies:
https-proxy-agent "3.0.0"
mkdirp@0.5.0: mkdirp@0.5.0:
version "0.5.0" version "0.5.0"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12"

Loading…
Cancel
Save