Closed tofumatt closed 7 months ago
(Moving to stalled because this component doesn't exist yet.)
@tofumatt is it maybe possible to add dependencies here? I don't know if the tickets for these component's exist already or not. In case they don't, can we add them later.
@ivonac4 Right now we don't have issues for it. In fact, I'm not quite sure what these events correspond to because I don't see mention of this component in the design doc either, I don't think.
@marrrmarrr Do you have a Figma design/screenshot/reference for the component that the view_overlay_CTA
+ {viewContext}_top-earning-pages-widget
event corresponds to from the Analytics events document? I'm not sure what it's for, so I created this issue just to note that we hadn't implemented the event, but I'm actually not sure what it's for 😓
@ivonac4 I've updated this as blocked by #8238, now that we have that filed 😄
Leaving this one in AC with me until we move #8238 into IB, because the events fired will depend on how many (1 or 2) CTAs there are 🙂
IB ✔️
Verified:
When the AdSense + GA connected notification is shown the following trackEvent calls are made:
{viewContext}_top-earning-pages-success-notification
, 'view_notification' ) when the notification is rendered and shown to the user{viewContext}_top-earning-pages-success-notification
, 'confirm_notification' ) when the user clicks the "Got it" CTA.
Feature Description
GA events (eg.
trackEvent
calls) should be added to the new "Top Earnings Pages" notification that appears after successful AdSense + GA4 integration/connection. There should be one when a user views the notification one when they click the "Show me" CTA button in the notification, and another when the user dismisses the notification with the "Got it" button.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
trackEvent
calls should be made:trackEvent( `{viewContext}_top-earning-pages-success-notification`, 'view_notification' )
when the notification is rendered and shown to the usertrackEvent( `{viewContext}_top-earning-pages-success-notification`, 'confirm_notification' )
when the user clicks the "Got it"/primary CTACTA widget screenshot:
Implementation Brief
trackEvent( `{viewContext}_top-earning-pages-success-notification`, 'view_notification' )
to https://github.com/google/site-kit-wp/blob/902f409b8c9010dd89f296d97a7507ca41d82e2a/assets/js/components/notifications/GA4AdSenseLinkedNotification.js#L46 when the component doesn't rendernull
, likely in auseEffect
that should only calltrackEvent
once per page load.trackEvent( `{viewContext}_top-earning-pages-success-notification`, 'confirm_notification' )
to theonClick
function of the primary button at https://github.com/google/site-kit-wp/blob/902f409b8c9010dd89f296d97a7507ca41d82e2a/assets/js/components/notifications/GA4AdSenseLinkedNotification.js#L212-L214, eg https://github.com/google/site-kit-wp/blob/902f409b8c9010dd89f296d97a7507ca41d82e2a/assets/js/components/notifications/GA4AdSenseLinkedNotification.js#L133-L135Test Coverage
QA Brief
Changelog entry