Closed tofumatt closed 2 months ago
@tofumatt @marrrmarrr Some comment as #8236, should we add a "The" in front of "top earning content" here?
Assigning this a rough estimate of 15 just for planning purposes, but as soon as someone can take on the IB it might need slight adjustment.
Marking this as blocked by #8236, because it contains the logic to deal with showing these notifications in general…
Thanks @tofumatt! I've added a Sp Wk 2
label here and a Sp Wk 1
label to #8237, since these are both planned for Sprint 122.
IB ✔️
@zutigrm
Issue
I noticed clicking on Primary CTA not scrolling down to Monetization section as mentioned in AC.
The primary CTA should dismiss the overlay (so it does not appear again) and scroll the user down to the Top Earning Pages widget in the "Monetization" section of the Site Kit Dashboard.
Q-2) I noticed that overlay is showing for all admin and on all view only dashboard. Is this expected ?
PASS CASES
Thanks @mohitwp ! I've fixed the scrolling on a follow up PR. And yes, it's fine to appear on second admins and view only dashboard provided that the Second Admin has access to both Analytics and Adsense or both modules are shared.
Sending back to CR.
Feature Description
Similar in style to the callout added for users who have not linked their accounts (see #8236), we should have a callout/notification for users when there is data available for their accounts after they have been linked. Note that the style is different to many "post-connection" notifications, and instead uses a small callout/overlay.
When clicked, the "Show me" CTA button should scroll the user to the widget that displays the new info.
Figma design: https://www.figma.com/file/7ba0pj1rLuvLvJhy3NiHOj/AdSense?type=design&node-id=10-5478&mode=design&t=lwcDSKVER9BoOVmZ-0
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
ga4AdSenseIntegration
feature flag (#8288) is enabled. When it is disabled, there should be no overlay/prompt shown.adSenseLinked
setting (see #8047) is set AND there is data to see in the AdSense + GA4 Top Earnings Pages report (see: https://github.com/google/site-kit-wp/blob/8612fe95e03b6029aab6cd32c9df6afd1d860225/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidget.js#L68-L89), an overlay informing them that their accounts are now linked and data is available to view (see screenshot/Figma design) should appear in the bottom-right corner of the page.Implementation Brief
assets/js/components/OverlayNotification/AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification.js
) using theOverlayNotificationBase
component with this overlay's content, roughly:ANALYTICS_ADSENSE_OVERLAY_DETECTED_AS_LINKED_DISMISSED = 'analytics-and-adsense-overlay-are-linked';
)const { dismissItem } = useDispatch( CORE_USER );
anddismissItem( ANALYTICS_ADSENSE_OVERLAY_DETECTED_AS_LINKED_DISMISSED )
ga4AdSenseIntegration
feature flag is enabledselect( CORE_USER ).hasAccessToShareableModule( 'analytics-4' )
)select( CORE_USER ).isItemDismissed( ANALYTICS_ADSENSE_OVERLAY_DETECTED_AS_LINKED_DISMISSED )
isfalse
useOverlayNotification
hook to manage the state of this overlay, similar to #8236, but with the component name'AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification'
as an argument, eguseOverlayNotification( 'AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification' )
.Test Coverage
AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification
component.QA Brief
googlesitekit.data.select('modules/analytics-4').getAdSenseLinked()
.Changelog entry