From f7e25027b7b9406c3f69aba2ceaa34c32b001bc2 Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Tue, 29 Oct 2019 14:22:52 -0600 Subject: [PATCH 1/5] Adding createAccountInitiated track to match Google flow. Correcting failure track. --- WordPressAuthenticator/Signin/AppleAuthenticator.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPressAuthenticator/Signin/AppleAuthenticator.swift b/WordPressAuthenticator/Signin/AppleAuthenticator.swift index 6d5b8fd8e..7f42228c2 100644 --- a/WordPressAuthenticator/Signin/AppleAuthenticator.swift +++ b/WordPressAuthenticator/Signin/AppleAuthenticator.swift @@ -65,6 +65,7 @@ private extension AppleAuthenticator { return } + WordPressAuthenticator.track(.createAccountInitiated, properties: ["source": "apple"]) SVProgressHUD.show(withStatus: NSLocalizedString("Continuing with Apple", comment: "Shown while logging in with Apple and the app waits for the site creation process to complete.")) let email = appleCredentials.email ?? "" @@ -138,7 +139,7 @@ private extension AppleAuthenticator { func signupFailed(with error: Error) { DDLogError("Apple Authenticator: Signup failed. error: \(error.localizedDescription)") - WordPressAuthenticator.track(.signupSocialFailure, properties: ["source": "apple"]) + WordPressAuthenticator.track(.signupSocialFailure, error: error) delegate?.authFailedWithError(message: error.localizedDescription) } From e89a76b097510b77a9150311e2e70a56b04f0672 Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Tue, 29 Oct 2019 14:23:42 -0600 Subject: [PATCH 2/5] Adding 'google' property to Google specific tracks. --- .../Signin/LoginEmailViewController.swift | 4 ++-- .../Signup/SignupGoogleViewController.swift | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WordPressAuthenticator/Signin/LoginEmailViewController.swift b/WordPressAuthenticator/Signin/LoginEmailViewController.swift index 26d07687c..35497bcc7 100644 --- a/WordPressAuthenticator/Signin/LoginEmailViewController.swift +++ b/WordPressAuthenticator/Signin/LoginEmailViewController.swift @@ -559,7 +559,7 @@ extension LoginEmailViewController { // Disconnect now that we're done with Google. GIDSignIn.sharedInstance().disconnect() - WordPressAuthenticator.track(.loginSocialSuccess) + WordPressAuthenticator.track(.loginSocialSuccess, properties: ["source": "google"]) } @@ -571,7 +571,7 @@ extension LoginEmailViewController { loginFields.emailAddress = email performSegue(withIdentifier: .showWPComLogin, sender: self) - WordPressAuthenticator.track(.loginSocialAccountsNeedConnecting) + WordPressAuthenticator.track(.loginSocialAccountsNeedConnecting, properties: ["source": "google"]) configureViewLoading(false) } diff --git a/WordPressAuthenticator/Signup/SignupGoogleViewController.swift b/WordPressAuthenticator/Signup/SignupGoogleViewController.swift index 43a4701ea..e196fd93c 100644 --- a/WordPressAuthenticator/Signup/SignupGoogleViewController.swift +++ b/WordPressAuthenticator/Signup/SignupGoogleViewController.swift @@ -21,7 +21,7 @@ class SignupGoogleViewController: LoginViewController { override func viewDidLoad() { super.viewDidLoad() titleLabel?.text = NSLocalizedString("Waiting for Google to complete…", comment: "Message shown on screen while waiting for Google to finish its signup process.") - WordPressAuthenticator.track(.createAccountInitiated) + WordPressAuthenticator.track(.createAccountInitiated, properties: ["source": "google"]) } override func viewDidAppear(_ animated: Bool) { @@ -133,7 +133,7 @@ private extension SignupGoogleViewController { // This stat is part of a funnel that provides critical information. Before // making ANY modification to this stat please refer to: p4qSXL-35X-p2 WordPressAuthenticator.track(.createdAccount, properties: ["source": "google"]) - WordPressAuthenticator.track(.signupSocialSuccess) + WordPressAuthenticator.track(.signupSocialSuccess, properties: ["source": "google"]) showSignupEpilogue(for: credentials) } @@ -141,8 +141,8 @@ private extension SignupGoogleViewController { /// Social Login Successful: Analytics + Pushing the Login Epilogue. /// func wasLoggedInInstead(with credentials: AuthenticatorCredentials) { - WordPressAuthenticator.track(.signupSocialToLogin) - WordPressAuthenticator.track(.loginSocialSuccess) + WordPressAuthenticator.track(.signupSocialToLogin, properties: ["source": "google"]) + WordPressAuthenticator.track(.loginSocialSuccess, properties: ["source": "google"]) showLoginEpilogue(for: credentials) } @@ -150,7 +150,7 @@ private extension SignupGoogleViewController { /// Social Signup Failure: Analytics + UI Updates /// func socialSignupDidFail(with error: Error) { - WPAnalytics.track(.signupSocialFailure) + WordPressAuthenticator.track(.signupSocialFailure, error: error) if (error as? SignupError) == .unknown { navigationController?.popViewController(animated: true) From 1b8bfbe83574653c81f36ef5c664a8dd54a1df2d Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Tue, 29 Oct 2019 14:23:52 -0600 Subject: [PATCH 3/5] Bumping pod version. --- WordPressAuthenticator.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index 4e7daaa9a..d3a283884 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.10.1" + s.version = "1.10.2-beta.1" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC From 675442e6420b82272f6217de2e47138a76024cfc Mon Sep 17 00:00:00 2001 From: Stephenie Harris Date: Wed, 30 Oct 2019 11:21:56 -0600 Subject: [PATCH 4/5] Adding 'source' property to signupSocialFailure tracks. --- WordPressAuthenticator/Signin/AppleAuthenticator.swift | 7 ++++++- .../Signup/SignupGoogleViewController.swift | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/WordPressAuthenticator/Signin/AppleAuthenticator.swift b/WordPressAuthenticator/Signin/AppleAuthenticator.swift index 7f42228c2..26ed4d8b4 100644 --- a/WordPressAuthenticator/Signin/AppleAuthenticator.swift +++ b/WordPressAuthenticator/Signin/AppleAuthenticator.swift @@ -139,7 +139,12 @@ private extension AppleAuthenticator { func signupFailed(with error: Error) { DDLogError("Apple Authenticator: Signup failed. error: \(error.localizedDescription)") - WordPressAuthenticator.track(.signupSocialFailure, error: error) + + let properties = [ "source": "apple", + "error": error.localizedDescription + ] + + WordPressAuthenticator.track(.signupSocialFailure, properties: properties) delegate?.authFailedWithError(message: error.localizedDescription) } diff --git a/WordPressAuthenticator/Signup/SignupGoogleViewController.swift b/WordPressAuthenticator/Signup/SignupGoogleViewController.swift index e196fd93c..21ae8d01b 100644 --- a/WordPressAuthenticator/Signup/SignupGoogleViewController.swift +++ b/WordPressAuthenticator/Signup/SignupGoogleViewController.swift @@ -150,7 +150,12 @@ private extension SignupGoogleViewController { /// Social Signup Failure: Analytics + UI Updates /// func socialSignupDidFail(with error: Error) { - WordPressAuthenticator.track(.signupSocialFailure, error: error) + + let properties = [ "source": "google", + "error": error.localizedDescription + ] + + WordPressAuthenticator.track(.signupSocialFailure, properties: properties) if (error as? SignupError) == .unknown { navigationController?.popViewController(animated: true) From 1093af4537ba780dac439b874d6ba46bfe72f980 Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Mon, 4 Nov 2019 10:49:14 +0100 Subject: [PATCH 5/5] Bump version to 1.10.2 --- WordPressAuthenticator.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index d3a283884..3063d7a14 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.10.2-beta.1" + s.version = "1.10.2" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC