Updates to the Ads Module Setup CTA Banner for WooCommerce Redirect #10175
Labels
javascript
Pull requests that update Javascript code
Module: Ads
Google Ads module related issues
Team S
Issues for Squad 1
Type: Enhancement
Improvement of an existing feature
Feature Description
The Ads Module Setup CTA banner, while implemented at some stage and then temporarily reverted, will require updates in the following areas in order to support the WooCommerce Redirect epic:
adsPAX
feature flag enabled.See Figma designs here. See the relevant section of the design document, "Amendments to the Ads Module Setup CTA Banner
".
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
adsPAX
feature flag who did not setup Ads module yet, and no detected Ads linked to Google for WooCommerce".
Implementation Brief
assets/js/components/notifications/AdsModuleSetupCTAWidget.js
assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.js
andassets/js/components/notifications/FirstPartyModeSetupBanner.js
for an exampleid
andNotification
in the propsNotification
componentNotificationWithSVG
component for the bannerdescription
usecreateInterpolateElement
to render learn more link with the descriptionactions
prop to include CTA's, by usingActionsCTALinkDismiss
componentonCTAClick
should use existingonSetupCallback
callbackdismissLabel
useisNotificationDismissalFinal
fromCORE_NOTIFICATIONS
datastore, to check whether to show 'Don’t show again' orMaybe later
labels. You can see how to implement this by looking forisDismissalFinal
and dismiss count logic inassets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.js
dismissExpires
use default2 * WEEK_IN_SECONDS
onDismiss
callback is not neededonDismiss
and dismissal logic that is handled automatically by new notification components, and remove the conditional rendering of the componentisAdBlockerActive
selector fromCORE_USER
store, and if it is, render the message (usingAdBlockerWarning
component) as part of thedescription
prop inNotificationWithSVG
, and prevent the primary CTASet up Ads
from being executed - skip callback being invokedgetAdBlockerWarningMessage
selector inassets/js/modules/ads/datastore/adblocker.js
to match the one from Figmaassets/js/modules/adsense/datastore/adblocker.js
, only keep the module nameAdSense
onSetupCallback
, it should not invoke any action ifshouldShowWooCommerceRedirectModal
selector fromCORE_SITE
istrue
<WooCommerceRedirectModal>
Modal Component #10172, and usingdialogActive
prop, pass the value ofshouldShowWooCommerceRedirectModal
selectorassets/js/modules/ads/index.js
registerNotifications
functionareaSlug
useNOTIFICATION_AREAS.BANNERS_BELOW_NAV
groupID
useNOTIFICATION_GROUPS.SETUP_CTAS
10
VIEW_CONTEXT_MAIN_DASHBOARD
for theviewContexts
isDismissible
usetrue
and includedismissRetries
with value1
featureFlag
property with value ofadsPax
checkRequirements
Ads
module is already setup usingisModuleActive
selector fromCORE_MODULES
datastore, and if it is, return early. Note thatisModuleActive
has a resolver, so you should useresolveSelect
to retrieve the valueisWooCommerceActive
,isGoogleForWooCommerceActive
andisGoogleForWooCommerceAdsAccountLinked
selectors added in Create New Ads Module Datastore Partial for Plugin Detection Selectors #10170 are all returningtrue
, to prevent rendering the notification - returnfalse
early. Otherwise it should returntrue
by defaultresolveSelect
)getModuleData
selector fromMODULES_ADS
datastore for data to be available on time the conditions are checked for the above selectorsTest Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: