From d4af62adcc679d6871cd7013c8df27d573ff763b Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 26 Jul 2017 14:34:50 -0400 Subject: [PATCH] Instrument registration happy path with analytics. // FREEBIE --- .../src/ViewControllers/CodeVerificationViewController.m | 3 +++ Signal/src/ViewControllers/RegistrationViewController.m | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Signal/src/ViewControllers/CodeVerificationViewController.m b/Signal/src/ViewControllers/CodeVerificationViewController.m index f98c44c8a..756051416 100644 --- a/Signal/src/ViewControllers/CodeVerificationViewController.m +++ b/Signal/src/ViewControllers/CodeVerificationViewController.m @@ -260,8 +260,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)verifyChallengeAction:(nullable id)sender { [self startActivityIndicator]; + OWSProdInfo(@"registration_registering_code"); [self.accountManager registerWithVerificationCode:[self validationCodeFromTextField]] .then(^{ + OWSProdInfo(@"registration_registered_complete"); + DDLogInfo(@"%@ Successfully registered Signal account.", self.tag); dispatch_async(dispatch_get_main_queue(), ^{ [self stopActivityIndicator]; diff --git a/Signal/src/ViewControllers/RegistrationViewController.m b/Signal/src/ViewControllers/RegistrationViewController.m index 51cfd4641..807501abe 100644 --- a/Signal/src/ViewControllers/RegistrationViewController.m +++ b/Signal/src/ViewControllers/RegistrationViewController.m @@ -52,6 +52,12 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi [[Environment getCurrent] setSignUpFlowNavigationController:self.navigationController]; } +- (void)viewDidLoad { + [super viewDidLoad]; + + OWSProdInfo(@"registration_began"); +} + - (void)createViews { self.view.backgroundColor = [UIColor ows_signalBrandBlueColor]; @@ -335,6 +341,8 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi __weak RegistrationViewController *weakSelf = self; [TSAccountManager registerWithPhoneNumber:parsedPhoneNumber success:^{ + OWSProdInfo(@"registration_registered_phone_number"); + [weakSelf.spinnerView stopAnimating]; CodeVerificationViewController *vc = [CodeVerificationViewController new];