Skip to content

Toggle display group as 'On' when changing analytics and enabling groups #9700

@kelvinballoo

Description

@kelvinballoo

Bug Description

This arose when doing Audience segmentation E2E test.
Currently, if under an admin toggles off the display visitor groups and changes analytics property.
If they enable the groups under the new analytics property, the toggle remains off but they still get a notification that visitor groups have been added to the dashboard. If we click on 'Show me' CTA, nothing shows up then.

Bottom line is when we 'enable groups' in the backend settings, we should toggle the display to 'ON'.
Else, there will be a scenario where the messaging doesn't align with the dashboard.

I've detailed everything in the attached video.

Steps to reproduce

  1. Set up AS tiles.
  2. Go to SK settings and toggle the 'Display visitor groups in dashboard' to off.
  3. Change to another analytics property.
  4. Go to SK settings and click on 'Enable groups'.

You will see a message that Visitor groups have been added to the dashboard.
However, when you go to the dashboard, nothing shows up.

Screenshots

AS.edge.case.mov

Additional Context

  • PHP Version:
  • OS: [e.g. iOS]
  • Browser: [e.g. chrome, safari]
  • Plugin Version: [e.g. 22]
  • Device: [e.g. iPhone6]

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

Acceptance criteria

  • The SetupSuccessContent notification shows up only when the "Display visitor groups in dashboard" toggle is successfully turned on (the request that saves the setting is completed successfully).

Implementation Brief

When switching between properties/accounts the value is not reset and isAudienceSegmentationWidgetHidden value remains from previously set property. We should reset isAudienceSegmentationWidgetHidden back to default value on account/property reset.

  • Update includes/Modules/Analytics_4/Reset_Audiences.php:

Test Coverage

  • Update tests/phpunit/integration/Modules/Analytics_4/Reset_AudiencesTest.php to reflect the change

QA Brief

  • Follow the steps to reproduce and ensure that the toggle is on after enabling audiences post property reset.

Changelog entry

  • Fix Audience segmentation toggling issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityTeam SIssues for Squad 1Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions