site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Allow users with existing GA account, but no matching property to create a(nother) account

Open bjackson27 opened this issue 7 years ago • 5 comments

During GA setup, if a user has a set of existing Analytics accounts, but wants to create a new one for that site, they have no option to do that. Screencast of current flow: https://drive.google.com/file/d/1UpxdQ1MNZVdEHr7fDITCmj249LQU89rh/view

Let's fix this.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

During GA setup, for cases where there is no pre-existing GA code on the site and the user has a set of existing GA accounts:

  • In addition to the list of the user's existing GA accounts, display option "Set up a new account" in the dropdown menu.
  • If the user selects "Set up a new account" from the dropdown menu, change the text of the blue button below from "Configure Analytics" to "Create an account". The button should take them to GA FE to set up the new account.
  • Add a link "Re-fetch my account" to the right of the button (same layout as for brand new user). GA-create-account-button
  • Once the user creates the account and clicks re-fetch in the plugin, display the new account as pre-selected in the dropdown menu and change the blue button text to "Configure Analytics". Screenshot 2019-11-19 at 14 40 16
  • If the user clicks "Configure Analytics", place the GA code for the new account on the site.

Implementation Brief

  • Add a new "Setup new Account" entry in the list of accounts in Analytics (https://github.com/google/site-kit-wp/blob/21aed60756bfb2e4c285cb22f4f8cab8edfa69a3/assets/js/modules/analytics/setup.js#L733)
  • When selected, display the same "Create an Account" content displayed when no account is found (https://github.com/google/site-kit-wp/blob/21aed60756bfb2e4c285cb22f4f8cab8edfa69a3/assets/js/modules/analytics/setup.js#L799-L807)

Changelog entry

  • Allow users that have existing Google Analytics account to create a new account in module setup and settings.

bjackson27 avatar Jul 11 '19 01:07 bjackson27

IB ✅

@tofumatt That's probably clear anyway, but just wanna make sure we also set the create buttons back to the regular "Configure Analytics" button whenever the user selects an actual account from the dropdown. In other words, the create buttons should only show for the specific scenario that "Set up a new account" is currently selected in the dropdown.

felixarntz avatar Dec 19 '19 07:12 felixarntz

Yup, that's what I assumed would happen as well—essentially, the "create new account" button is only visible when the "Set up a new account" selection is made. (It should hide the other dropdowns as well.)

tofumatt avatar Dec 19 '19 17:12 tofumatt

Tested

Setup new instance of WP, confirmed create account flow: image

Logged this bug: https://github.com/google/site-kit-wp/issues/1039

Confirmed create new account flow drives user to new account creation: image

Created a new account: image

Confirmed re-fetch flow drives to my new account: image

Flow complete: image

Ran a series of negative tests, canceling and clicking around.

@aaemnnosttv, should we allow this flow in the config section?

image

Positive test Passed QA ✅

cole10up avatar Jan 15 '20 05:01 cole10up

@aaemnnosttv, should we allow this flow in the config section?

I believe so. All modules can do everything in the settings as setup, but not everything is configurable during setup.

aaemnnosttv avatar Jan 15 '20 07:01 aaemnnosttv

LGTM

marrrmarrr avatar Jan 15 '20 14:01 marrrmarrr