Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not initially show secondary dropdown in GA4-transitional Analytics setup flow if applicable associated property is found #3287

Closed
felixarntz opened this issue May 4, 2021 · 3 comments
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature

Comments

@felixarntz
Copy link
Member

felixarntz commented May 4, 2021

In the ga4-transitional version of the Analytics module setup, if for the property type reflected by the secondary dropdown (the one that displays within the info notice, see #3250) there is already a matched property (see #3286), the dropdown should not be shown initially. Instead, the user should simply be informed about that it looks like there is already an associated property, with a pencil icon button allowing to change it (i.e. show the dropdown) if desired.


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

Acceptance criteria

  • In the ga4transitional version of the Analytics setup flow, the info notice which allows selecting the associated property of the respective other type (i.e. GA4 if the primary property is a UA property, or UA if the primary property is a GA4 property) should be adjusted if Site Kit already "guessed" a match for that property (see Improve default Analytics property selection when selecting an Analytics account #3291 for UA and Automatically pre-select GA4 property in dropdown based on current site URL #3286 for GA4).
    • It should in such a case not show the dropdown but just state the property that looks like it is the correct one. However, it should also show a pencil icon button that leads to the default UI with the dropdown so that the user is able to update the selection if needed.
    • In other words, if the primary property is a UA property, the UI should look like this.
    • If the primary property is a GA4 property, the UI should look like this.

Implementation Brief

  • Add new actions setPropertyIsAutomaticallySelected( bool ) to the properties datastore of analytics and analytics-4 modules. They should set the propertyIsAutomaticallySelected flag in the state object.
  • Update the selectAccount action of the analytics module to dispatch setPropertyIsAutomaticallySelected( true ) action if the matchPropertyByURL function finds a matching property.
  • Update the matchAndSelectProperty action of the analytics-4 module to dispatch setPropertyIsAutomaticallySelected( true ) action if the matchPropertyByURL returns a matching property.
  • Add new selectors isPropertyAutomaticallySelected to the properties datastore of analytics and analytics-4 modules. They should return the propertyIsAutomaticallySelected flag from the state object.
  • Update the SetupFormGA4Transitional component to display a notice message if a secondary property (based on the current property type) is automatically selected (use the above selector, isPropertyAutomaticallySelected() to get this info). It should also display a pencil icon/button that should allow users to change the selected property. See AC for more details.
  • Internal state in the SetupFormGA4Transitional can be used to signify if the dropdown should be shown—it should show the dropdown if isPropertyAutomaticallySelected() is false. But clicking the Pencil icon should modify the internal state to show the dropdown.

Test Coverage

  • Add js tests for the new actions and selectors.

Visual Regression Changes

  • N/A

QA Brief

Changelog entry

@felixarntz felixarntz added P0 High priority Type: Enhancement Improvement of an existing feature Module: Analytics Google Analytics module related issues labels May 4, 2021
@felixarntz felixarntz self-assigned this May 4, 2021
@felixarntz felixarntz added P1 Medium priority and removed P0 High priority labels May 4, 2021
@felixarntz felixarntz removed their assignment May 4, 2021
@fhollis fhollis added this to the Sprint 50 milestone May 16, 2021
@tofumatt tofumatt self-assigned this May 25, 2021
@tofumatt
Copy link
Collaborator

IB ✅

I added a note about using internal state to manage the pencil icon dropdown, but otherwise looks good 👍🏻

@tofumatt tofumatt removed their assignment May 25, 2021
@danielgent
Copy link
Contributor

This ticket requires SetupFormGA4Transitional, which has been done in Implement Analytics setup form UI for accounts that have both UA properties and GA4 properties #3250, and that ticket is in Code Review.

This looks like it should be included on the ticket as "This issue is blocked by..."

@felixarntz
Copy link
Member Author

Good question @danielgent. However, this issue may actually no longer be relevant (see below), so I'm not going to address it just yet.

I'm going to temporarily move this back to ACs. After revisiting this issue in regards to our newly defined approach for existing tag permission, we may be able to close this. I'll confirm tomorrow with @marrrmarrr.

cc @eclarke1 @fhollis If we close this, let's reassess capacity and whether there's anything else worth including in the sprint.

@felixarntz felixarntz self-assigned this May 25, 2021
@fhollis fhollis removed this from the Sprint 50 milestone May 26, 2021
@felixarntz felixarntz removed their assignment May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants