The Setup CTA Banner shows again when the No Audiences Banner is visible.
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
[x] In assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Add an additional check dismissCount === undefinedhere, 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.
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.
Bug Description
There are a couple of glitches relating to the Audience Segmentation Setup CTA Banner.
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.
audienceSegmentation
feature flag enabled and Analytics connected.The Setup CTA Banner shows again when the No Audiences Banner is visible.
audienceSegmentation
feature flag enabled and Analytics connected.Screenshots
The "Don't show again" dismissal CTA flashes in place of the "Maybe later" CTA.
https://github.com/user-attachments/assets/1a79dabc-9986-4341-86a0-82e3db1bba76
The Setup CTA Banner shows again when the No Audiences Banner is visible.
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
[x] In
assets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.js
Add an additional check
dismissCount === undefined
here, so that ifdismissCount
isundefined
, the component returnsnull
. This will make sure that dismissed prompts data is loaded before the banner is displayed.For the
useEnableAudienceGroup
hook, pass theonSuccess
callback such that it should calldismissPrompt
and pass slug asAUDIENCE_SEGMENTATION_SETUP_CTA_NOTIFICATION
andexpiresInSeconds
as zero (permanent dismissal). Make theonSuccess
callbackasync
.Test coverage
dismissCount
andonSuccess
behaviour inassets/js/modules/analytics-4/components/audience-segmentation/dashboard/AudienceSegmentationSetupCTAWidget.test.js
QA Brief
Steps to reproduce
steps.Changelog entry