Only show one of the Consent Mode and Audience Segmentation Setup CTA Banners at a time. #8709
Labels
Module: Analytics
Google Analytics module related issues
Next Up
Issues to prioritize for definition
P1
Medium priority
Squad 2 (Team M)
Issues for Squad 2
Type: Enhancement
Improvement of an existing feature
Feature Description
The initial integration of the Audience Segmentation Setup CTA Banner doesn't account for the fact the Consent Mode Setup CTA Banner may be shown at the same time.
We should ensure that only one of these banners is shown at a time. If they are both eligible to be displayed, the Consent Mode banner should take precedence.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Note that as per this comment, we should refactor the relevant components to avoid duplication of the inlined widget context and area structures.
SetupCTAWidget
insideassets/js/components/setup/
AudienceSegmentationSetupCTAWidget
andConsentModeSetupCTAWidget
is same, extract theSetupCTAWidget
component which will render the common markup.SetupCTAWidget
should accept the prop liketitle
,description
,handleCTAClick
,handleDismiss
,SVGItemComponent
andsetupSlug
.title
would be the title for the setup CTA widget.description
would be the description for the widget.handleCTAClick
callback when the CTA is clicked.handleDismiss
callback when the banner is dismissed.SVGItemComponent
component to render the SVG element. It can be wrapped up insideCell
component as bothConsentModeSetupCTAWidget
andAudienceSegmentationSetupCTAWidget
renders it withinCell
.setupSlug
can beaudience-segmentation
orconsent-mode
. This is useful to keep the css classes intact. We can use this prop where classes likegooglesitekit-audience-segmentation-setup-cta-widget
orgooglesitekit-consent-mode-setup-cta-widget
are being used, so that we can insert likegooglesitekit-${setupSlug}-setup-cta-widget
.isSaving
andsaveError
.AudienceSegmentationSetupCTAWidget
andConsentModeSetupCTAWidget
components can reuse the extracted component and pass the relevant props to it.displayConsentModeSetupWidget
in consent-mode data store. Condition to display the widget can be found inConsentModeSetupCTAWidget
component here.DashboardMainApp
, check if the consent mode setup widget can be display using the selector. If it can be displayed, do not renderAudienceSegmentationSetupCTAWidget
, else it should be rendered.Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: