You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue extends the Site Goals side panel so users can control which Visitor engagement secondary conversion-event tiles are shown in the Site Goals widgets. The panel should expose Visitor engagement event toggles per goal type, and the widget should render only selected and currently eligible secondary events while always keeping the Engagement rate tile visible.
For this iteration, the only supported selectable secondary ecommerce event is add_to_cart.
In the Online store performance dropdown, Visitor engagement renders selectable event items from supported secondary ecommerce events. For this issue, this is only the add_to_cart event (currently available/supported).
Selecting/deselecting Visitor engagement event items updates side-panel selection state for ecommerce.
The Engagement rate tile remains always visible in VisitorEngagementSection, regardless of panel selections.
The additional Visitor engagement tile(s) in Online store render only when:
the event is selected in panel state, and
the event is eligible for current context (secondary to current primary event).
If add_to_cart is deselected, its Visitor engagement tile is hidden.
If current primary event is add_to_cart (no secondary ecommerce events), no additional Visitor engagement tile is rendered or shown in the list.
Lead generation widget keeps engagement-rate behavior unchanged in this issue (no additional lead Visitor engagement event tiles added here).
Implementation Brief
Add assets/js/modules/analytics-4/components/site-goals/visitor-engagement/registry.ts with centralized Visitor engagement event metadata.
Include id, order, defaultEnabled, panelLabel, tileLabel; for this issue register only add_to_cart.
Keep structure extensible for future events (begin_checkout, remove_from_cart, etc.) without changing panel/widget contracts.
Extend Site Goals selection-panel state shape in assets/js/modules/analytics-4/components/site-goals/selection-panel/constants.ts and panel state handlers.
Use per-goal-type structure, e.g. visitorEngagement: { ecommerce: [...], lead: [...] }.
Update assets/js/modules/analytics-4/components/site-goals/selection-panel/Panel.tsx to initialize staged Visitor engagement values when panel opens and persist effective values on save.
Follow the same staged/effective pattern already used for Goal drivers in this panel.
Update assets/js/modules/analytics-4/components/site-goals/selection-panel/PanelContent.tsx to render a Visitor engagement subsection inside the Online store performance dropdown.
Place subsection between Key action and Goal drivers, matching provided designs.
Render checkbox items from visitor-engagement/registry.js.
Add reusable subsection/list component(s) if needed: assets/js/modules/analytics-4/components/site-goals/selection-panel/VisitorEngagementItems.tsx.
Keep it presentational and driven by props from panel container state.
Resolve selected event IDs with safe filtering and ordering from registry; ignore unknown IDs; return array for widget consumption.
Add selector/hook used by widgets to read effective Visitor engagement selection: assets/js/modules/analytics-4/components/site-goals/selection-panel/hooks/useSiteGoalsEffectiveSelection.ts.
Provide goal-type specific selected Visitor engagement events.
Only fetch/map secondary eventCount tiles for enabledSecondaryEvents.
Continue passing normalized props into VisitorEngagementSection.
Keep assets/js/modules/analytics-4/components/site-goals/widgets/LeadGenerationPerformanceWidget.tsx unchanged for extra Visitor engagement event tiles.
No selection/state fetching inside the section component.
Reuse centralized event label mapping where possible, and align Visitor engagement tile label for add_to_cart with design copy (Products added to cart).
Avoid hardcoding labels separately in widget and panel.
Verify ordering, unknown ID filtering, and default behavior.
Extend OnlineStorePerformanceWidget tests.
Verify Engagement rate always renders; add_to_cart tile renders when selected+eligible; hides when deselected; hides when primary event is add_to_cart.
Extend LeadGenerationPerformanceWidget tests.
Verify no additional Visitor engagement event tile renders in this issue.
Extend VisitorEngagementSection tests as needed.
Verify presentational rendering remains driven by normalized props and unaffected by panel internals.
QA Brief
Connect SK with siteGoals feature flags
Verify that for Online store performance metric Products added to the cart is present in the widget under visitor engagement section when add_to_cart conversion event is available, and under visitor engagement in selection panel.
Checking/unchecking it from side panel should add/remove that metrics from section in the widget
When add to cart event is not detected it should not show it in the widget, or side panel. You can go to Tester settings -> Analytics -> Conversion reporting and set purchase and/or add_to_cart as detected events to verify that metrics is showing/not showing
You can also check wexford website it has ecomm data for past 90 days period, or any other that has conversion reporting data. If using wexford - it has only purchase data, you can verify that add to cart metric is not showing
Changelog entry
Add Visitor Engagement settings to Site Goals' Side Panel
Feature Description
This issue extends the Site Goals side panel so users can control which Visitor engagement secondary conversion-event tiles are shown in the Site Goals widgets. The panel should expose Visitor engagement event toggles per goal type, and the widget should render only selected and currently eligible secondary events while always keeping the Engagement rate tile visible.
For this iteration, the only supported selectable secondary ecommerce event is
add_to_cart.Design doc
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
add_to_cartevent (currently available/supported).VisitorEngagementSection, regardless of panel selections.add_to_cartis deselected, its Visitor engagement tile is hidden.add_to_cart(no secondary ecommerce events), no additional Visitor engagement tile is rendered or shown in the list.Implementation Brief
Add
assets/js/modules/analytics-4/components/site-goals/visitor-engagement/registry.tswith centralized Visitor engagement event metadata.id,order,defaultEnabled,panelLabel,tileLabel; for this issue register onlyadd_to_cart.begin_checkout,remove_from_cart, etc.) without changing panel/widget contracts.Extend Site Goals selection-panel state shape in
assets/js/modules/analytics-4/components/site-goals/selection-panel/constants.tsand panel state handlers.visitorEngagement: { ecommerce: [...], lead: [...] }.Update
assets/js/modules/analytics-4/components/site-goals/selection-panel/Panel.tsxto initialize staged Visitor engagement values when panel opens and persist effective values on save.Update
assets/js/modules/analytics-4/components/site-goals/selection-panel/PanelContent.tsxto render a Visitor engagement subsection inside the Online store performance dropdown.visitor-engagement/registry.js.Add reusable subsection/list component(s) if needed:
assets/js/modules/analytics-4/components/site-goals/selection-panel/VisitorEngagementItems.tsx.Add
assets/js/modules/analytics-4/components/site-goals/visitor-engagement/getActiveVisitorEngagementEvents.ts.Add selector/hook used by widgets to read effective Visitor engagement selection:
assets/js/modules/analytics-4/components/site-goals/selection-panel/hooks/useSiteGoalsEffectiveSelection.ts.Widget integration
Update
assets/js/modules/analytics-4/components/site-goals/widgets/OnlineStorePerformanceWidget.tsx.getSecondaryEcommerceEvents( primaryEvent )behavior.enabledSecondaryEvents = intersection( selectedVisitorEngagementEvents, secondaryEcommerceEvents ).eventCounttiles forenabledSecondaryEvents.VisitorEngagementSection.Keep
assets/js/modules/analytics-4/components/site-goals/widgets/LeadGenerationPerformanceWidget.tsxunchanged for extra Visitor engagement event tiles.Ensure
assets/js/modules/analytics-4/components/site-goals/widgets/VisitorEngagementSection.tsxremains presentational-only.Reuse centralized event label mapping where possible, and align Visitor engagement tile label for
add_to_cartwith design copy (Products added to cart).Test Coverage
Add selection-panel tests under:
assets/js/modules/analytics-4/components/site-goals/selection-panel/.Add resolver/helper tests for:
assets/js/modules/analytics-4/components/site-goals/visitor-engagement/getActiveVisitorEngagementEvents.ts.Extend
OnlineStorePerformanceWidgettests.add_to_carttile renders when selected+eligible; hides when deselected; hides when primary event isadd_to_cart.Extend
LeadGenerationPerformanceWidgettests.Extend
VisitorEngagementSectiontests as needed.QA Brief
siteGoalsfeature flagsadd_to_cartconversion event is available, and under visitor engagement in selection panel.purchaseand/oradd_to_cartas detected events to verify that metrics is showing/not showingChangelog entry