Skip to content

Commit

Permalink
Add original GA tracking event category for all CoMo setup CTA banner…
Browse files Browse the repository at this point in the history
… actions.
  • Loading branch information
jimmymadon committed Jan 24, 2025
1 parent 5aba46f commit 163329d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ import SingleColumnNotificationWithSVG from '../../googlesitekit/notifications/c
import Description from '../../googlesitekit/notifications/components/common/Description';
import LearnMoreLink from '../../googlesitekit/notifications/components/common/LearnMoreLink';
import ActionsCTALinkDismiss from '../../googlesitekit/notifications/components/common/ActionsCTALinkDismiss';
import useViewContext from '../../hooks/useViewContext';

export default function ConsentModeSetupCTAWidget( { id, Notification } ) {
const [ saveError, setSaveError ] = useState( null );

const breakpoint = useBreakpoint();

const viewContext = useViewContext();
const gaTrackingEventArgs = {
category: `${ viewContext }_CoMo-ads-setup-notification`,
};

const settingsURL = useSelect( ( select ) =>
select( CORE_SITE ).getAdminURL( 'googlesitekit-settings' )
);
Expand Down Expand Up @@ -144,7 +150,7 @@ export default function ConsentModeSetupCTAWidget( { id, Notification } ) {
};

return (
<Notification>
<Notification gaTrackingEventArgs={ gaTrackingEventArgs }>
<SingleColumnNotificationWithSVG
id={ id }
title={ __(
Expand Down Expand Up @@ -188,6 +194,7 @@ export default function ConsentModeSetupCTAWidget( { id, Notification } ) {
skipHidingFromQueue: true,
} }
dismissExpires={ 2 * WEEK_IN_SECONDS }
gaTrackingEventArgs={ gaTrackingEventArgs }
/>
}
SVG={
Expand Down

0 comments on commit 163329d

Please sign in to comment.