Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show the Audiences Widget Area when it's turned off in Settings #9065

Closed
1 task done
techanvil opened this issue Jul 23, 2024 · 4 comments
Closed
1 task done
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature

Comments

@techanvil
Copy link
Collaborator

techanvil commented Jul 23, 2024

Feature Description

Ensure the Audiences Widget Area on the dashboard is hidden when the "Display visitor groups in dashboard" switch is toggled off in the Settings section.


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

Acceptance criteria

  • When the "Display visitor groups in dashboard" switch is toggled off in the Settings section, the Audiences Widget Area should not be present on the dashboard.

Implementation Brief

  • During the widget area registration here, pass the filterActiveWidgets function as the property settings property to registerWidgetArea function. It accepts two arguments select and areaWidgets

    • In filterActiveWidgets function check if audience segmentation widget is hidden using
    select( CORE_USER ).isAudienceSegmentationWidgetHidden();
    • If it is hidden, return an empty array from function else areaWidgets.

Test coverage

No additional test required.

QA Brief

  1. Enable the Audience Segmentation feature. Make sure audience tiles are visible in dashboard, if not enable it through CTA banner using Enable Groups CTA.
  2. Go to Site Kit > Settings, turn off Display visitor groups in dashboard toggle.
  3. Make sure that audiences widget area is not available so that following widgets won't be visible.
  • Audience tiles
  • No audience banner
  • Google analytics connect CTA
  • Info notice widget
  1. Re-enable the toggle and widget area should show the relevant widgets mentioned above (as per their fulfilment conditions).

Changelog entry

  • Don't show the Audiences Widget Area on the dashboard when the "Display visitor groups in dashboard" switch is toggled off in the Settings section.
@techanvil techanvil added Module: Analytics Google Analytics module related issues P1 Medium priority Type: Enhancement Improvement of an existing feature labels Jul 23, 2024
@ankitrox ankitrox assigned ankitrox and unassigned ankitrox Aug 14, 2024
@eugene-manuilov eugene-manuilov self-assigned this Aug 19, 2024
@eugene-manuilov
Copy link
Collaborator

IB :heavy

@eugene-manuilov eugene-manuilov removed their assignment Aug 19, 2024
@ivonac4 ivonac4 added the Team M Issues for Squad 2 label Aug 21, 2024
@ankitrox ankitrox self-assigned this Aug 23, 2024
@ankitrox ankitrox removed their assignment Aug 23, 2024
@techanvil techanvil assigned techanvil and unassigned techanvil Aug 23, 2024
@kelvinballoo
Copy link
Collaborator

QA Update ⚠️

This is working well overall.
There is one observation here: ⚠️

  • The Google connect CTA isn't currently governed by the toggle but by the Analytics.

  • If analytics is disconnected, the Display visitor groups in dashboard toggle isn't present anymore.

    Disconnected.analytics.has.no.toggle.actually.mov

I personally think we should update the logic such that even if analytics is disconnected, the Display visitor groups in dashboard toggle should still appear.


Apart from that, it's all working well:

  • Info notice widget and audience tiles are hiding and showing correctly. ✅

    Tiles.and.info.notice.tested.good.mov
  • No audience banner hides accordingly. ✅

    archiving.audience.-.groups.unavailable.CTA.mov

@techanvil
Copy link
Collaborator Author

techanvil commented Aug 29, 2024

Thanks @kelvinballoo, that's a good point. Initially, the audience settings were part of the Analytics module so we needed Analytics to be active in order to show the switch, but now we've moved the settings out to the user scope, we can show the switch even when Analytics is not active/connected.

It's out of scope for this issue though, so please can you create a new one for it?

@techanvil techanvil removed their assignment Aug 29, 2024
@kelvinballoo
Copy link
Collaborator

QA Update ✅

Thanks @techanvil .
New issue raised under : #9264

As for this ticket, it's good to be moved to approval as it's working well.

  • Info notice widget and audience tiles are hiding and showing correctly. ✅

    Tiles.and.info.notice.tested.good.mov
  • No audience banner hides accordingly. ✅

    archiving.audience.-.groups.unavailable.CTA.mov

@kelvinballoo kelvinballoo removed their assignment Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants