Skip to content

Fix the browser's back button for the Key Metrics setup screen. #12503

@ankitrox

Description

@ankitrox

Feature Description

Pressing the browser's back button on the Key Metrics setup screen during setup doesn't navigate back to the Analytics setup screen, due to the logic we've put in place to return to the same screen if the user exits the setup flow.

We need to ensure the browser's back button takes the user back to the Analytics screen.


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

Acceptance criteria

  • When the user presses browser's back button on Key Metrics setup screen during initial setup, they should land on Analytics screen.

Implementation Brief

  • In includes/Core/Admin/Screens.php
    • Update this part of code to check if request explicitly targets Analytics setup route when initial setup is incomplete, if yes, do not redirect even when Analytics is already connected.
      • slug=analytics-4
      • reAuth=true
      • showProgress=true

Test Coverage

  • Add test for this case where request is explicitly for analytics setup and initial setup is incomplete.

QA Brief

  • Start setting up Site Kit with the setupFlowRefresh feature flag enabled and Analytics connected.
  • Press the browser's back button on the Key Metrics setup screen, and confirm that it returns to the Analytics setup screen.

Changelog entry

  • Fix the browser back button on the Key Metrics setup screen, which does not navigate back to the Analytics setup screen.

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