Skip to content

Don't show the shared Key Metrics feature tour or the Audience Segmentation introductory overlay when the Welcome modal is present. #12066

@techanvil

Description

@techanvil

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 setupFlowRefresh feature flag.

Implementation Brief

  • Gate the following changes behind the setupFlowRefresh feature flag.
  • In assets/js/components/KeyMetrics/hooks/useChangeMetricsFeatureTourEffect.js:
  • In assets/js/modules/analytics-4/index.js, update the checkRequirements() callback for the AUDIENCE_SEGMENTATION_INTRODUCTORY_OVERLAY_NOTIFICATION notification:
    • If the isInitialWelcomeModalActive() function returns true, dismiss the notification and return false.
  • See this PoC PR.

Test Coverage

  • Add tests for the useChangeMetricsFeatureTourEffect() hook.
  • Extend the checkRequirements() tests in assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationIntroductoryOverlayNotification.test.js to cover the above changes.

QA Brief

  • Set up Site Kit with Analytics setupFlowRefresh enabled
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions