Add CAEM-backed experiment result query classes with legacy CubeJS fallback switch
Open
@freddyDOTCMS is already working on this.
Since Aug 26, 2026.
dotCMS : Experiments
Team : Falcon
Type : Task
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Description
Add new experiment goal result query implementations in dotCMS core that call the CAEM analytics API endpoints (introduced in issues #37223 and #37224) instead of CubeJS. The existing CubeJS-based classes are not removed — both sets coexist and a switch mechanism controls which implementation is active, allowing legacy infrastructure to remain supported during the transition.
New implementations (alongside existing CubeJS classes):
- HTTP client to communicate with the CAEM analytics API
- Bounce rate result query using the new sessions endpoint
- Exit rate result query using the new sessions endpoint with reference page
- Reach-target result query using the new sessions behavior endpoint
- URL-parameter result query using the new sessions behavior endpoint
Switch mechanism:
- A configuration switch selects between the legacy CubeJS path and the new CAEM analytics path at runtime
- No behavioral change occurs unless the switch is explicitly enabled
- The two paths query different analytics infrastructure (CubeJS vs. CAEM/ClickHouse), but should produce the same goal rates when both backends have ingested the same underlying events
Acceptance Criteria
- A new HTTP client is available to call CAEM analytics API endpoints for sessions and session behavior
- New bounce rate result query returns correct goal rates using the CAEM sessions endpoint
- New exit rate result query returns correct goal rates using the CAEM sessions endpoint with reference page
- New reach-target result query returns correct goal rates using the CAEM sessions behavior endpoint
- New URL-parameter result query returns correct goal rates using the CAEM sessions behavior endpoint
- Existing CubeJS-based result query classes remain unchanged and functional
- A switch (e.g. configuration flag) selects between the legacy CubeJS path and the new CAEM analytics path
- When the switch is disabled, the system uses the existing CubeJS implementation (no regression)
- When the switch is enabled, the system uses the new CAEM-backed implementations
- Unit tests cover each new result query class
- Unit tests cover the switch dispatch logic
Additional Context
Depends on CAEM endpoints introduced in:
- #37223 — Extend GET /v1/analytics/sessions
- #37224 — Add GET /v1/analytics/sessions/behavior
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.