Skip to content

Part 4: Sign in Milestone 1 Tracks Events#1137

Merged
anitaa1990 merged 9 commits intofeature/signin-milestone-1from
amanda/signin-tracks-events
Jun 13, 2019
Merged

Part 4: Sign in Milestone 1 Tracks Events#1137
anitaa1990 merged 9 commits intofeature/signin-milestone-1from
amanda/signin-tracks-events

Conversation

@AmandaRiu
Copy link
Copy Markdown
Contributor

@AmandaRiu AmandaRiu commented Jun 11, 2019

This PR partially addresses #1091 by adding the logic to track events for new sign in milestone 1 features. This includes:

  • Date Events
  • View Events

Previous PRs for this feature

Not Included in this PR (coming later):

  • Create instructions support page and link the "View Instructions" button to this page.

Data Events

We are using the FetchConnectedSiteInfo FluxC endpoint temporarily do a pre-check on the url entered in LoginSiteAddressFragment.

LOGIN_CONNECTED_SITE_INFO_REQUESTED(url)

  • We sent a request to FluxC to validate the URL

LOGIN_CONNECTED_SITE_INFO_FAILED(url, error, message)

  • The request to validate URL did not complete for some reason. This could be something like a network issue.

LOGIN_CONNECTED_SITE_INFO_SUCCEEDED(url, exists, hasJetpack, isJetpackActive, isJetpackConnected, isWordPress, isWPCom, jetpackVersion, skipRemoteInstall)

  • The request to validate the url succeeded. This does not mean the URL is valid, it only means we were able to successfully validate it.

View Events

Login Email Screen

A new "Need help finding the email you connected with?" link was added to the login screen where the user enters their email.

LOGIN_BY_EMAIL_HELP_FINDING_CONNECTED_EMAIL_LINK_TAPPED

  • Tracks when this link is tapped

Login Jetpack Required Screen

This screen is displayed when the FetchConnectedSiteInfo result tells us that Jetpack is not connected to this WordPress site.

LOGIN_JETPACK_REQUIRED_SCREEN_VIEWED
LOGIN_JETPACK_REQUIRED_VIEW_INSTRUCTIONS_BUTTON_TAPPED
LOGIN_JETPACK_REQUIRED_CONTACT_SUPPORT_BUTTON_TAPPED
LOGIN_JETPACK_REQUIRED_WHAT_IS_JETPACK_LINK_TAPPED
LOGIN_JETPACK_REQUIRED_MENU_HELP_TAPPED

What is Jetpack? Dialog

LOGIN_WHAT_IS_JETPACK_HELP_SCREEN_LEARN_MORE_BUTTON_TAPPED
LOGIN_WHAT_IS_JETPACK_HELP_SCREEN_OK_BUTTON_TAPPED
LOGIN_WHAT_IS_JETPACK_HELP_SCREEN_VIEWED

What email do I sign in with? Dialog

LOGIN_FIND_CONNECTED_EMAIL_HELP_SCREEN_VIEWED
LOGIN_FIND_CONNECTED_EMAIL_HELP_SCREEN_NEED_MORE_HELP_LINK_TAPPED
LOGIN_FIND_CONNECTED_EMAIL_HELP_SCREEN_OK_BUTTON_TAPPED

Site picker screen & Auto Login

SitePickerActivity has a lot of responsibilities. When performing a login by url, it will check to make sure the url belongs to the authenticated account and has WooCommerce installed. It's also used as the Site Switcher from the Settings screen so that should be tested as well.

SITE_PICKER_AUTO_LOGIN_SUBMITTED(selected_store_id)

  • The initial check to make sure the site belongs to the authenticated user and Woo is installed passed. Attempting an auto-login. The logic to verify API version happens after this event.

SITE_PICKER_AUTO_LOGIN_ERROR_NOT_CONNECTED_TO_USER(url, has_connected_stores [true|false])

  • The site entered during login does not belong to the authenticated user.

SITE_PICKER_AUTO_LOGIN_ERROR_NOT_WOO_STORE(url, has_connected_stores [true|false])

  • The site entered during login does not have Woo installed.

SITE_PICKER_TRY_ANOTHER_ACCOUNT_BUTTON_TAPPED

  • The try another account button was pressed. This logs out the user and returns them to the start of login.

SITE_PICKER_VIEW_CONNECTED_STORES_BUTTON_TAPPED

  • The view connected stores button was tapped. This is only available if the user has stores connected to this account.

SITE_PICKER_HELP_FINDING_CONNECTED_EMAIL_LINK_TAPPED

  • The Need help finding the connected email? link was tapped. This is only available if the user enters a site that is not connected to the authenticated account.

@AmandaRiu AmandaRiu marked this pull request as ready for review June 13, 2019 03:10
@anitaa1990 anitaa1990 self-assigned this Jun 13, 2019
@anitaa1990 anitaa1990 self-requested a review June 13, 2019 08:11
Copy link
Copy Markdown
Contributor

@anitaa1990 anitaa1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmandaRiu, everything looks great! LGTM :shipit:

@anitaa1990 anitaa1990 merged commit 770c899 into feature/signin-milestone-1 Jun 13, 2019
@anitaa1990 anitaa1990 deleted the amanda/signin-tracks-events branch June 13, 2019 08:12
@AmandaRiu AmandaRiu mentioned this pull request Jun 14, 2019
1 task
@designsimply designsimply added feature: login Related to any part of the log in or sign in flow, or authentication. and removed Login labels May 6, 2021
@peril-woocommerce
Copy link
Copy Markdown

peril-woocommerce bot commented May 6, 2021

Fails
🚫

Danger failed to run /app/danger-0.a95l4vdf47b.ts.

Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into wordpress-mobile/WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout amanda/signin-tracks-events
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/1137
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/1137 and open a new PR.

Error TypeError

Cannot read property 'diff' of null
TypeError: Cannot read property 'diff' of null
    at checkCommitDiffs (/app/danger-0.a95l4vdf47b.ts:43:49)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Dangerfile

38|         if (git === undefined) {
39|             console.log("About to crash due to an error")
40|             console.log("File:", thisFile)
41|             console.log("Danger Object: ", danger)
42| 
---------------------------------------------------^
43|             if (danger !== undefined) {
44|                 console.log("Danger is no longer defined")
45|             }
46|             else {

Generated by 🚫 dangerJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: login Related to any part of the log in or sign in flow, or authentication.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants