Update and consolidate stories for existing tags
See original GitHub issueFeature Description
As part of the effort of simplifying cases around the handling of existing tags, we have a number of “duplicate” stories now due to the removal of “access” to a tag as a factor.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The following old stories under
Analytics module / Setup
andAnalytics module / Settings
below should be removed
- New stories for existing tags should be created accordingly using the newer CSF format, co-located with their respective components’
.stories.js
Modules/Analytics/Setup/SetupFormUA/
:- ExistingTag – Existing UA tag, no property selected
Modules/Analytics/Setup/SetupFormGA4/
:- ExistingTag – Existing GA4 tag, no property selected
Modules/Analytics/Setup/SetupFormGA4Transitional/
:- ExistingTagUA – Existing UA tag, non-matching property selected
- ExistingTagGA4 – Existing GA4 tag, non-matching property selected
- ExistingTagUAGA4 – Existing tags, both UA+GA4 matching selected properties
- ExistingGTMPropertyUANonMatching – GTM (UA) property that does not match the selected UA property ID
- ExistingGTMPropertyUAMatching – GTM (UA) property that does match the selected UA property ID
Modules/Analytics/Settings/SettingsEdit/
:- ExistingTagUA – Existing UA tag, non-matching property selected
- ExistingTagGA4 – Existing GA4 tag, non-matching property selected
- ExistingTagUAGA4 – Existing tags, both UA+GA4 matching selected properties
- ExistingGTMPropertyUANonMatching – GTM (UA) property that does not match the selected UA property ID
- ExistingGTMPropertyUAMatching – GTM (UA) property that does match the selected UA property ID
Implementation Brief
- In
stories/module-analytics-setup.stories.js
andstories/module-analytics-settings.stories.js
, remove the stories mentioned in the AC. - Using
assets/js/modules/analytics/components/setup/SetupFormUA.stories.js
,- add a new story as per the AC for
SetupFormUA
with the setup form in its initial state, i.e no property selected.- In order to do so, no account should be selected.
- The call to set the account,
registry.dispatch( MODULES_ANALYTICS ).selectAccount( accountID );
in the global story decorator might need to be moved to invidual stories where we need to set the account.
- add a new story as per the AC for
- Same points as the above but applied to
SetupFormGA4
. - For
SetupFormGA4Transitional
andSettingsEdit
, refer to the old stories instories/module-analytics-setup.stories.js
andstories/module-analytics-settings.stories.js
for the actions to be dispatched in order to recreate the stories. - Refer to the AC for the story names.
Test Coverage
- VRT might need to be updated in case they are relying on the old stories.
QA Brief
Note: Although the IB talks only about adding stories, there are a number of existing stories which cover some or all of the AC and needed to be modified rather than adding new ones. As such, the story names used have been kept consistent with existing stories.
Also, note that it’s not technically possible/realistic to implement the proposed ExistingTag – Existing GA4 tag, no property selected story so this has not been attempted.
- Check the stories listed to be removed in the AC have been removed.
- Note that the stories Edit, with existing tag w/ access and Edit, with existing tag w/o access in
Analytics Module/Settings
were determined to be the equivalent of the listed Existing Tag w/ access and Existing tag w/o access stories and were deleted.
- Note that the stories Edit, with existing tag w/ access and Edit, with existing tag w/o access in
- Ensure the highlighted stories implement or are updated in line with the AC, notwithstanding the notes above.
Screenshots for reference:
Modules/Analytics/Settings/SettingsEdit
With UA Tag, non-matching property selected
With GA4 Tag, non-matching property selected
With Both Tags, both UA+GA4 matching selected properties
With GTM (UA) property that does not match the selected UA property ID
With GTM (UA) property that does match the selected UA property ID
Modules/Analytics/Settings/SetupFormGA4Transitional
With UA Tag, non-matching property selected
With GA4 Tag, non-matching property selected
With Both Tags, both UA+GA4 matching selected properties
With GTM (UA) property that does not match the selected UA property ID
With GTM (UA) property that does match the selected UA property ID
Modules/Analytics/Settings/SetupFormUA
With UA Tag, no property selected
Changelog entry
- N/A
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
@aaemnnosttv ACs lgtm, two points:
@mohitwp yes, they are the same 👍
These were added as part of #5301