-
Notifications
You must be signed in to change notification settings - Fork 328
Description
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
- Set up AS tiles.
- Go to SK settings and toggle the 'Display visitor groups in dashboard' to off.
- Change to another analytics property.
- 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
SetupSuccessContentnotification 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:- Include the missed
isAudienceSegmentationWidgetHiddensetting with default valuefalseto the the list of reset settingssite-kit-wp/includes/Modules/Analytics_4/Reset_Audiences.php
Lines 135 to 138 in d79a5f6
array( 'configuredAudiences' => null, 'didSetAudiences' => false, ),
- Include the missed
Test Coverage
- Update
tests/phpunit/integration/Modules/Analytics_4/Reset_AudiencesTest.phpto 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