diff --git a/Simplenote/AuthViewController.m b/Simplenote/AuthViewController.m index 1bc51065c..f8c071150 100644 --- a/Simplenote/AuthViewController.m +++ b/Simplenote/AuthViewController.m @@ -140,7 +140,7 @@ - (void)pressedLogInWithPassword { } - (void)pressedLoginWithMagicLink { - [SPTracker trackUserRequestedLoginLink]; + [SPTracker trackLoginLinkRequested]; [self clearAuthenticationError]; diff --git a/Simplenote/MagicLinkAuthenticator.swift b/Simplenote/MagicLinkAuthenticator.swift index 45de5c2ca..05cbdcce0 100644 --- a/Simplenote/MagicLinkAuthenticator.swift +++ b/Simplenote/MagicLinkAuthenticator.swift @@ -74,11 +74,12 @@ private extension MagicLinkAuthenticator { authenticator.authenticate(withUsername: confirmation.username, token: confirmation.syncToken) NotificationCenter.default.post(name: .magicLinkAuthDidSucceed, object: nil) - SPTracker.trackUserConfirmedLoginLink() + SPTracker.trackLoginLinkConfirmationSuccess() } catch { NSLog("[MagicLinkAuthenticator] Magic Link TokenExchange Error: \(error)") NotificationCenter.default.post(name: .magicLinkAuthDidFail, object: error) + SPTracker.trackLoginLinkConfirmationFailure() } } diff --git a/Simplenote/MagicLinkConfirmationView.swift b/Simplenote/MagicLinkConfirmationView.swift index fffe37cf0..089ac108a 100644 --- a/Simplenote/MagicLinkConfirmationView.swift +++ b/Simplenote/MagicLinkConfirmationView.swift @@ -43,7 +43,7 @@ struct MagicLinkConfirmationView: View { } private var invalidLinkText: some View { - Text("Link was no longer valid") + Text("Link no longer valid") .font(.title3) .foregroundColor(.gray) } diff --git a/Simplenote/SPTracker.h b/Simplenote/SPTracker.h index a15b95838..bf1459ac9 100644 --- a/Simplenote/SPTracker.h +++ b/Simplenote/SPTracker.h @@ -74,8 +74,11 @@ NS_ASSUME_NONNULL_BEGIN + (void)trackUserSignedUp; + (void)trackUserSignedIn; + (void)trackUserSignedOut; -+ (void)trackUserRequestedLoginLink; -+ (void)trackUserConfirmedLoginLink; + +#pragma mark - Login Links ++ (void)trackLoginLinkRequested; ++ (void)trackLoginLinkConfirmationSuccess; ++ (void)trackLoginLinkConfirmationFailure; #pragma mark - WP.com Sign In + (void)trackWPCCButtonPressed; diff --git a/Simplenote/SPTracker.m b/Simplenote/SPTracker.m index 7c742362f..97c114f51 100644 --- a/Simplenote/SPTracker.m +++ b/Simplenote/SPTracker.m @@ -262,14 +262,22 @@ + (void)trackUserSignedOut [self trackAutomatticEventWithName:@"user_signed_out" properties:nil]; } -+ (void)trackUserRequestedLoginLink + +#pragma mark - Login Links + ++ (void)trackLoginLinkRequested +{ + [self trackAutomatticEventWithName:@"login_link_requested" properties:nil]; +} + ++ (void)trackLoginLinkConfirmationSuccess { - [self trackAutomatticEventWithName:@"user_requested_login_link" properties:nil]; + [self trackAutomatticEventWithName:@"login_link_confirmation_success" properties:nil]; } -+ (void)trackUserConfirmedLoginLink ++ (void)trackLoginLinkConfirmationFailure { - [self trackAutomatticEventWithName:@"user_confirmed_login_link" properties:nil]; + [self trackAutomatticEventWithName:@"login_link_confirmation_failure" properties:nil]; }