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

Fix glitches in the Audience Segmentation Setup CTA Banner #9231

Closed
1 task done
techanvil opened this issue Aug 23, 2024 · 2 comments
Closed
1 task done

Fix glitches in the Audience Segmentation Setup CTA Banner #9231

techanvil opened this issue Aug 23, 2024 · 2 comments
Labels
Module: Analytics Google Analytics module related issues P1 Medium priority Team M Issues for Squad 2 Type: Bug Something isn't working

Comments

@techanvil
Copy link
Collaborator

techanvil commented Aug 23, 2024

Bug Description

There are a couple of glitches relating to the Audience Segmentation Setup CTA Banner.

  1. The "Don't show again" dismissal CTA flashes in place of the "Maybe later" CTA.
  2. The Setup CTA Banner shows again when the No Audiences Banner is visible.

These should be small fixes and can be addressed in this single issue.

Steps to reproduce

The "Don't show again" dismissal CTA flashes in place of the "Maybe later" CTA.

  1. Set up Site Kit with the audienceSegmentation feature flag enabled and Analytics connected.
  2. Refresh the dashboard to show the Setup CTA Banner.
  3. The dismissal CTA will briefly show the "Don't show again" text in place of "Maybe later".
  4. Run through the setup process and the same glitch will occur while the "Enabling groups" CTA is showing.

The Setup CTA Banner shows again when the No Audiences Banner is visible.

  1. Set up Site Kit with the audienceSegmentation feature flag enabled and Analytics connected.
  2. Set up the Audience Segmentation feature with the "new visitors" and "returning visitors" audiences selected.
  3. Archive the audiences in Analytics (or hide them using the Tester plugin).
  4. Refresh the dashboard and open the Selection Panel to trigger an audience resync.
  5. See the Setup CTA Banner unexpectedly return, while the No Audiences Banner is displayed as expected.

Screenshots

The "Don't show again" dismissal CTA flashes in place of the "Maybe later" CTA.

dont_show_again_cta_flash.mp4

The Setup CTA Banner shows again when the No Audiences Banner is visible.

enable_groups_with_no_audiences

Additional Context

  • PHP Version: any
  • OS: any
  • Browser: any
  • Plugin Version: pre-release 1.134.0
  • Device: any

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

Acceptance criteria

  • The "Don't show again" dismissal should not flash in place of the when the "Maybe later" CTA as described in the steps to reproduce.
  • The Setup CTA Banner should not appear when the No Audiences Banner is visible.

Implementation Brief

  • In assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
    • Add an additional check dismissCount === undefined here, so that if dismissCount is undefined, the component returns null. This will make sure that dismissed prompts data is loaded before the banner is displayed.

    • For the useEnableAudienceGroup hook, pass the onSuccess callback such that it should call dismissPrompt and pass slug as AUDIENCE_SEGMENTATION_SETUP_CTA_NOTIFICATION and expiresInSeconds as zero (permanent dismissal). Make the onSuccess callback async.

Test coverage

  • Add tests for dismissCount and onSuccess behaviour in assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.test.js

QA Brief

  • Issue should no longer be visible using Steps to reproduce steps.

Changelog entry

  • Fix glitches relating to the Audience Segmentation Setup CTA Banner.
@techanvil techanvil added Module: Analytics Google Analytics module related issues P1 Medium priority Type: Bug Something isn't working labels Aug 23, 2024
@techanvil techanvil assigned techanvil and unassigned techanvil Aug 23, 2024
@techanvil techanvil changed the title Glitches relating to the Audience Segmentation Setup CTA Banner Glitches in the Audience Segmentation Setup CTA Banner Aug 23, 2024
@techanvil techanvil changed the title Glitches in the Audience Segmentation Setup CTA Banner Fix glitches in the Audience Segmentation Setup CTA Banner Aug 23, 2024
@ankitrox ankitrox assigned ankitrox and unassigned ankitrox Aug 23, 2024
@ivonac4 ivonac4 added the Team M Issues for Squad 2 label Aug 29, 2024
@techanvil techanvil self-assigned this Aug 29, 2024
@techanvil
Copy link
Collaborator Author

IB ✅

@techanvil techanvil removed their assignment Aug 29, 2024
@ankitrox ankitrox self-assigned this Sep 2, 2024
@ankitrox ankitrox removed their assignment Sep 3, 2024
@techanvil techanvil assigned techanvil and ankitrox and unassigned techanvil Sep 3, 2024
@ankitrox ankitrox assigned techanvil and unassigned ankitrox Sep 3, 2024
@techanvil techanvil removed their assignment Sep 4, 2024
@kelvinballoo
Copy link
Collaborator

QA Update ✅

This was verified good. Moving ticket to Approval.

  • There was no glitch observed in the 'Maybe Later' button upon the first reload and also after clicking the 'Enable Groups' and go through the oAuth flow.
  • The setup CTA banner did not reappear after the audience sync when opening the audience selection panel.
Test.successful.mov

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: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants