Remove Mixpanel

pull/81/head
Niels Andriesse 4 years ago
parent b9727197e8
commit f3c36391b9

@ -46,7 +46,6 @@
#import <SignalServiceKit/TSSocketManager.h>
#import <YapDatabase/YapDatabaseCryptoUtils.h>
#import <sys/utsname.h>
#import <Mixpanel/Mixpanel.h>
#import <FirebaseCore/FirebaseCore.h>
@import WebRTC;
@ -355,12 +354,6 @@ static NSTimeInterval launchStartedAt;
// NSLog(@"[Loki] Failed to start P2P server.");
// }
// Loki - Set up beta analytics
[Mixpanel sharedInstanceWithToken:@"0410357303b7b6b45b740e6f0e6d34be"];
LKAnalytics.shared.trackImplementation = ^(NSString *event) {
NSDictionary *properties = @{ @"configuration" : LKBuildConfiguration.current };
[Mixpanel.sharedInstance track:event properties:properties];
};
#if DEBUG
#else
[FIRApp configure];
@ -1261,7 +1254,6 @@ static NSTimeInterval launchStartedAt;
performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
{
NSLog(@"[Loki] Performing background fetch.");
[LKAnalytics.shared track:@"Performed Background Fetch"];
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
NSMutableArray *promises = [NSMutableArray new];

@ -92,8 +92,6 @@
self.title = NSLocalizedString(@"SETTINGS_NAV_BAR_TITLE", @"Title for settings activity");
[self updateTableContents];
[LKAnalytics.shared track:@"Settings Opened"];
}
- (void)viewWillAppear:(BOOL)animated
@ -536,7 +534,6 @@
}
UIActivityViewController *shareVC = [[UIActivityViewController alloc] initWithActivityItems:@[ hexEncodedPublicKey ] applicationActivities:nil];
[self presentViewController:shareVC animated:YES completion:nil];
[LKAnalytics.shared track:@"Public Key Shared"];
}
- (void)showQRCode

@ -462,7 +462,6 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
- (void)deleteThreadsAndMessages
{
[LKAnalytics.shared track:@"Conversation History Cleared"];
[ThreadUtil deleteAllContent];
}
@ -470,11 +469,6 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
{
BOOL enabled = sender.isOn;
OWSLogInfo(@"toggled screen security: %@", enabled ? @"ON" : @"OFF");
if (enabled) {
[LKAnalytics.shared track:@"Screen Security Enabled"];
} else {
[LKAnalytics.shared track:@"Screen Security Disabled"];
}
[self.preferences setScreenSecurity:enabled];
}
@ -489,11 +483,6 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
{
BOOL enabled = sender.isOn;
OWSLogInfo(@"toggled areTypingIndicatorsEnabled: %@", enabled ? @"ON" : @"OFF");
if (enabled) {
[LKAnalytics.shared track:@"Typing Indicators Enabled"];
} else {
[LKAnalytics.shared track:@"Typing Indicators Disabled"];
}
[self.typingIndicators setTypingIndicatorsEnabledWithValue:enabled];
}
@ -549,11 +538,6 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
- (void)didToggleLinkPreviewsEnabled:(UISwitch *)sender
{
OWSLogInfo(@"toggled to: %@", (sender.isOn ? @"ON" : @"OFF"));
if (sender.isOn) {
[LKAnalytics.shared track:@"Link Previews Enabled"];
} else {
[LKAnalytics.shared track:@"Link Previews Disabled"];
}
SSKPreferences.areLinkPreviewsEnabled = sender.isOn;
}
@ -576,12 +560,6 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
}
OWSLogInfo(@"trying to set is screen lock enabled: %@", @(shouldBeEnabled));
if (shouldBeEnabled) {
[LKAnalytics.shared track:@"Screen Lock Enabled"];
} else {
[LKAnalytics.shared track:@"Screen Lock Disabled"];
}
[OWSScreenLock.sharedManager setIsScreenLockEnabled:shouldBeEnabled];
}

@ -404,8 +404,6 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
if ([OWSProfileManager.sharedManager isProfileNameTooLong:normalizedProfileName]) {
return [OWSAlerts showErrorAlertWithMessage:NSLocalizedString(@"Please pick a shorter display name", @"")];
}
[LKAnalytics.shared track:@"Display Name Updated"];
// Show an activity indicator to block the UI during the profile upload.
[ModalActivityIndicatorViewController

@ -74,8 +74,6 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
stackView.autoPin(toBottomLayoutGuideOf: self, withInset: 0)
lokiLogoImageView.autoCenterInSuperview()
Analytics.shared.track("Landing Screen Viewed")
if UserDefaults.standard.bool(forKey: "wasUnlinked") {
let alert = UIAlertController(title: NSLocalizedString("Device Unlinked", comment: ""), message: NSLocalizedString("Your device was unlinked successfully", comment: ""), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: ""), accessibilityIdentifier: nil, style: .default, handler: nil))

@ -78,7 +78,6 @@ public extension LokiAPI {
return randomSnodePool.randomElement()!
}.recover(on: DispatchQueue.global()) { error -> Promise<LokiAPITarget> in
print("[Loki] Failed to contact seed node at: \(target).")
Analytics.shared.track("Seed Node Failed")
throw error
}.retryingIfNeeded(maxRetryCount: 16) // The seed nodes have historically been unreliable
} else {

@ -174,13 +174,7 @@ public final class LokiPublicChatAPI : LokiDotNetAPI {
storage.dbReadWriteConnection.removeObject(forKey: server, inCollection: authTokenCollection)
}
throw error
}.retryingIfNeeded(maxRetryCount: maxRetryCount).map { message in
Analytics.shared.track("Group Message Sent")
return message
}.recover(on: DispatchQueue.global()) { error -> Promise<LokiPublicChatMessage> in
Analytics.shared.track("Failed to Send Group Message")
throw error
}
}.retryingIfNeeded(maxRetryCount: maxRetryCount)
}
public static func getDeletedMessageServerIDs(for channel: UInt64, on server: String) -> Promise<[UInt64]> {

Loading…
Cancel
Save