-
Notifications
You must be signed in to change notification settings - Fork 336
Description
Feature Description
When a secondary admin or a view-only user lands on the dashboard for the first time for a site where Key Metrics is already set up, the shared Key Metrics feature tour should not be present on the dashboard, as it would interfere with the Welcome modal and the dashboard tour.
Additionally, when a secondary admin or a view-only user lands on the dashboard for the first time for a site where Audience Segmentation is already set up, the Audience Segmentation introductory overlay should not be present on the dashboard, for the same reason.
In each case, the tour or overlay should be dismissed, as it won't be relevant for the user in a subsequent visit (the new dashboard tour introduces both features).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Given a site with Key Metrics connected, when a secondary admin or a view-only user lands on the dashboard for the first time:
- The shared Key Metrics feature tour is not present on the dashboard.
- The tour doesn't appear on a subsequent visit to the dashboard.
- Given a site with Audience Segmentation connected, when a secondary admin or a view-only user lands on the dashboard for the first time:
- The Audience Segmentation introductory overlay is not present on the dashboard.
- The overlay doesn't appear on a subsequent visit to the dashboard.
- These changes are gated behind the
setupFlowRefreshfeature flag.
Implementation Brief
- Gate the following changes behind the
setupFlowRefreshfeature flag. - In
assets/js/components/KeyMetrics/hooks/useChangeMetricsFeatureTourEffect.js:- Use the
useEffect()hook, if theisInitialWelcomeModalActive()function (added in Don't show the Welcome modal for existing users when Setup Flow Refresh is enabled. #12068) returnstrue:- If the shared Key Metrics feature tour is not already dismissed, dismiss it.
- Return early from the hook.
- Use the
- In
assets/js/modules/analytics-4/index.js, update thecheckRequirements()callback for theAUDIENCE_SEGMENTATION_INTRODUCTORY_OVERLAY_NOTIFICATIONnotification:- If the
isInitialWelcomeModalActive()function returnstrue, dismiss the notification and returnfalse.
- If the
- See this PoC PR.
Test Coverage
- Add tests for the
useChangeMetricsFeatureTourEffect()hook. - Extend the
checkRequirements()tests inassets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationIntroductoryOverlayNotification.test.jsto cover the above changes.
QA Brief
- Set up Site Kit with Analytics
setupFlowRefreshenabled - Make sure Audience Segmentation is enabled
- Log in as a different admin user
- Ensure that when the Welcome Modal is present, the Key Metrics tour is not triggered and the Audience Segmentation overlay (New! Visitor groups) is not shown
Changelog entry
- Prevent the shared Key Metrics feature tour and Audience Segmentation introductory overlay from appearing when the Welcome modal is present for secondary admins and view-only users.