Refactor the ReaderRevenueManagerSetupCTABanner
to not display simultaneously with other CTAs
#9889
Open
13 tasks done
Labels
Feature Description
Since the introduction of multiple recent features and modules, their new setup CTAs can all be rendered simultaneously if their necessary feature flags and other conditions are met.
Until the introduction and overhaul of our existing notifications into perhaps a new "notifications centre", we should fix this issue to only show one CTA at a time. This issue focuses on refactoring the
ReaderRevenueManagerSetupCTABanner
to use the Setup CTAs queue created as part of theSignInWithGoogleSetupCTA
component.dashboard.mp4
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
ReaderRevenueManagerSetupCTABanner
should be refactored to render in a separate queue of setup CTAs.AudienceSegmentationSetupCTAWidget
ConsentModeSetupCTAWidget
FirstPartyModeSetupBanner
SignInWithGoogleSetupCTABanner
ReaderRevenueManagerSetupCTABanner
Implementation Brief
Register the
ReaderRevenueManagerSetupCTABanner
as a separate notification following the pattern withinassets/js/modules/sign-in-with-google/index.js
.rrm-setup-notification
as the notification ID as this is the ID used in for the GA tracking events.groupID: NOTIFICATION_GROUPS.SETUP_CTAS
.Component
, use the existingReaderRevenueManagerSetupCTABanner
when registering the notification and remove the direct call from<DashboardMainApp>
.isDismissible
should be set to true.checkRequirements
callback should include all logic from within the notification which prevents it from rendering (i.e.showBanner
check that returnnull
.) This logic should be removed from theReaderRevenueManagerSetupCTABanner
component.Refactor the
ReaderRevenueManagerSetupCTABanner
component to use the a newNotificationWithSVG
component following the pattern withinassets/js/modules/sign-in-with-google/index.js
.Adapt the
dismissNotification
action to useprompts
instead ofdismissedItems
.options
:dismissRetries
.dismissRetries
is greater than 0, then fetch thegetPromptDismissCount
and check if this count < the number ofdismissRetries
. If it is, dispatch thedismissPrompt
action instead of thedismissItem
action, passingexpiresInSeconds
as normal.dismissRetries
option in theReaderRevenueManagerSetupCTABanner
component and call thedismissNotification
action instead of thedismissPrompt
action directly.Test Coverage
QA Brief
confirm_notification
GA event is correctly fired. Also test that the RRM setup is correctly finished and successful.wp_googlesitekitpersistent_dismissed_prompts
row for your user in the database.wp_googlesitekitpersistent_dismissed_prompts
and set the large expires integer value to 1 for thes:22:"rrm-setup-notification";a:2:{s:7:"expires";i:1737116828;s:5:"count";i:1;
value.Dont show again
. Click on this and ensure the notification is dismissed again. All dismissals should fire the correctdismiss_notification
GA tracking event.Changelog entry
The text was updated successfully, but these errors were encountered: