wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.66k stars 1.11k forks source link

Logins via Apple are incorrectly tracked as signups #18031

Open guarani opened 2 years ago

guarani commented 2 years ago

Expected behavior

Logins via Apple should be tracked as logins.

Actual behavior

“Continue with Apple” flows that are logins being incorrectly tracked as sign-ups.

Steps to reproduce the behavior

  1. Log in to the app using the "Continue with Apple" button.
  2. Open the Activity Logs
  3. Notice the siwa_signup in the 🔵 Tracked: unified_login_step <flow: siwa_signup, source: default, step: success> Tracks event.
Tested on iPhone 11, iOS 15.2.1, WPiOS 19.3 beta
ChrissiePollock commented 2 years ago

This is brought up in #4904262-zen and I can replicate it on my own site and acount.

guarani commented 2 years ago

Thanks for the report, @ChrissiePollock! This GitHub issue describes a non-user-facing bug where Apple logins are tracked as signups in our analytics tool.

This is brought up in #4904262-zen and I can replicate it on my own site and acount.

Reading that linked ticket, it appears to describe a different – user-facing issue – where the user is unable to log in ("Customer is unable to log in through the WordPress.com app" is what I read there).

Also, it appears that the customer's login issue was resolved (perhaps by reinstalling the app).

Since you mentioned @ChrissiePollock that you were able to replicate the issue, it sounds like there's still a bug. Do you still have steps to reproduce?

I briefly tested the login with Apple flow on WPiOS 19.6 and it worked correctly. I did not test signup with Apple.

cc @antonis

ChrissiePollock commented 2 years ago

I have another person with this issue in #4933269-zen. I'm sending you a screencast in a DM in Slack.

mkevins commented 1 year ago

I have investigated (and debugged) this a bit, and it seems that we are invoking createWordPressComUser when signing in, which in turn sets the flow to signupWithApple. I will continue investigating this, since this seems unexpected for signing in (there is already an account :man_shrugging: ).