-
Notifications
You must be signed in to change notification settings - Fork 480
feat(analytics): Add conversions dashboard with tabbed reporting interface #34135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ard tab functionality
…rsions table components
…roved formatting and sorting options
…conversion metrics
…rsions report component
…ate dashboard store to utilize them
5beb528 to
c7cdaf9
Compare
…te related components to utilize it
…TotalConversions call
…t and styling for improved readability
…lize EventSummary for improved event tracking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a comprehensive conversions dashboard for analytics with a tabbed interface and significant architectural improvements. The implementation adds conversion tracking capabilities alongside existing pageview analytics while refactoring the state management to use composable NgRx signal store features for better modularity.
Key Changes:
- Tabbed dashboard interface with URL-based state management (pageview/conversions tabs)
- Modular NgRx signal store architecture using composable features (withFilters, withPageview, withConversions)
- Generic CubeJS query service replacing endpoint-specific methods
- New conversions components including metrics cards, charts, and data tables
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Language.properties | Adds 41 new translation keys for conversions dashboard UI elements |
| dot-analytics-dashboard.component.ts | Refactored to tabbed interface with simplified event handling |
| dot-analytics-dashboard.component.spec.ts | Test suite completely removed - critical coverage gap |
| dot-analytics-dashboard-pageview-report | New component extracting pageview metrics and charts |
| dot-analytics-dashboard-conversions-report | New component for conversions metrics, charts, and tables |
| dot-analytics-dashboard-metrics.component | Enhanced to support fraction display formats |
| dot-analytics-dashboard-chart.component | Refactored to support combo charts with dual Y-axes |
| dot-analytics-content-conversions-table | New table component for content attribution data |
| dot-analytics-conversions-overview-table | New table component for conversions summary |
| dot-analytics-dashboard.store.ts | Refactored to compose features with coordinated data loading |
| with-filters.feature.ts | New shared filter state feature |
| with-pageview.feature.ts | New pageview-specific state and data loading |
| with-conversions.feature.ts | New conversions-specific state and data loading |
| dot-analytics.service.ts | Simplified to single generic cubeQuery method |
| cube-query-builder.util.ts | Enhanced with multi-cube support and conversion filtering |
| analytics-data.utils.ts | Added conversion data transformers and utilities |
| filters.utils.ts | New utilities for tab/timeRange validation and conversion |
...alytics-dashboard-conversions-report/dot-analytics-dashboard-conversions-report.component.ts
Show resolved
Hide resolved
...b/libs/portlets/dot-analytics/data-access/src/lib/store/features/with-conversions.feature.ts
Show resolved
Hide resolved
...dot-analytics-dashboard-pageview-report/dot-analytics-dashboard-pageview-report.component.ts
Show resolved
Hide resolved
…ate related components for consistency
Summary
This PR implements a comprehensive Conversions Dashboard for analytics (#33846), introducing a tabbed dashboard interface with pageview and conversions reporting capabilities, while significantly refactoring the analytics state management architecture to use composable NgRx signal store features for improved modularity and maintainability.
Changes Made
Architecture Refactoring
Modular State Management: Refactored monolithic store into composable signal store features
with-filters.feature.ts: Shared filter state (timeRange, currentTab) with URL syncwith-pageview.feature.ts: Pageview-specific state and data loading logicwith-conversions.feature.ts: Conversions-specific state and data loading logicdot-analytics-dashboard.store.ts:1-165now composes these features with coordinated effectsService Layer Simplification: Transformed
DotAnalyticsServicefrom endpoint-specific methods to generic CubeJS query executorcubeQuery<T>()methodCubeQueryBuilderutilitydot-analytics.service.ts:28-44Backend
Enhanced CubeJS Query Builder (
cube-query-builder.util.ts)conversions(),contentUrl(),hostName(),queryString()Analytics Data Utilities (
analytics-data.utils.ts)ConversionTrendEntity,TrafficVsConversionsEntitytoTimeRangeCubeJS()for time range conversionFrontend
Dashboard Components
Tabbed Dashboard Interface (
dot-analytics-dashboard.component.ts:22-94)Conversions Report Component (new)
dot-analytics-dashboard-conversions-report.component.ts: Main container with 4 metrics cardsPageview Report Component (new)
dot-analytics-dashboard-pageview-report.component.ts: Extracted from main componentTable Components
Conversions Overview Table (
dot-analytics-conversions-overview-table.component.ts)Content Conversions Table (
dot-analytics-content-conversions-table.component.ts)Enhanced Metrics Component
dot-analytics-dashboard-metrics.component.ts:20-88)RequestState<T>for any metric typeformatNumber()utilityConfiguration
Dashboard Constants (
dot-analytics.constants.ts)DASHBOARD_TABS,DASHBOARD_TAB_LISTDashboardTab,DashboardTabConfigType Definitions (
entities.types.ts,common.types.ts,cubequery.types.ts)TotalConversionsEntity,ConvertingVisitorsEntity, etc.CubeJSQueryinterface with all CubeJS optionsRequestState<T>utility type with helper functioncreateInitialRequestState()Tests
dot-analytics.service.spec.tsfrom endpoint-specific to generic query testingcube-query-builder.util.spec.tsInternationalization
Language.properties)analytics.dashboard.tabs.*,analytics.dashboard.conversions.*URL State Synchronization
The dashboard maintains state in URL query params (
?tab=conversions&timeRange=last7days), enabling:Breaking Changes
None - this is a new feature addition with backward-compatible refactoring of internal implementation.
Testing
Related Issues
Closes #33846
This PR fixes: #33846