Skip to content

Add CAEM-backed experiment result query classes with legacy CubeJS fallback switch #37227

Description

@freddyARD

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:

Activity

  1. added theissue type on Aug 25, 2026
  2. moved this from New to Next Sprint in dotCMS - Product Planningon Aug 25, 2026
  3. moved this from Next Sprint to Current Sprint Backlog in dotCMS - Product Planningon Aug 26, 2026
  4. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    PRs linked to this issue

  5. moved this from Current Sprint Backlog to Spec in dotCMS - Product Planningon Aug 31, 2026
  6. moved this from Spec In Progress to Spec In Review in dotCMS - Product Planningon Aug 31, 2026
  7. moved this from Spec In Review to Spec In Progress in dotCMS - Product Planningon Aug 31, 2026
  8. moved this from Spec In Progress to Spec In Review in dotCMS - Product Planningon Aug 31, 2026
  9. 6 remaining items

  10. moved this from In Review to In Progress in dotCMS - Product Planningon Sep 21, 2026
  11. moved this from In Progress to QA in dotCMS - Product Planningon Sep 21, 2026
  12. moved this from QA to In Review in dotCMS - Product Planningon Sep 22, 2026
  13. moved this from In Review to In Progress in dotCMS - Product Planningon Sep 22, 2026
  14. moved this from In Progress to In Review in dotCMS - Product Planningon Sep 22, 2026
  15. moved this from In Review to QA in dotCMS - Product Planningon Sep 22, 2026
  16. removed their assignment
    on Sep 22, 2026
  17. jcastro-dotcms commented on Sep 25, 2026

    @jcastro-dotcms
    Member
  18. removed their assignment
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions