Do not initially show secondary dropdown in GA4-transitional Analytics setup flow if applicable associated property is found #3287
Labels
Module: Analytics
Google Analytics module related issues
P1
Medium priority
Type: Enhancement
Improvement of an existing feature
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
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).Implementation Brief
setPropertyIsAutomaticallySelected( bool )
to the properties datastore ofanalytics
andanalytics-4
modules. They should set thepropertyIsAutomaticallySelected
flag in the state object.selectAccount
action of the analytics module to dispatchsetPropertyIsAutomaticallySelected( true )
action if thematchPropertyByURL
function finds a matching property.matchAndSelectProperty
action of the analytics-4 module to dispatchsetPropertyIsAutomaticallySelected( true )
action if thematchPropertyByURL
returns a matching property.isPropertyAutomaticallySelected
to the properties datastore ofanalytics
andanalytics-4
modules. They should return thepropertyIsAutomaticallySelected
flag from the state object.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.SetupFormGA4Transitional
can be used to signify if the dropdown should be shown—it should show the dropdown ifisPropertyAutomaticallySelected()
isfalse
. But clicking the Pencil icon should modify the internal state to show the dropdown.Test Coverage
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: