dotCMS / dotCMS/core

Add persist/read-only Persistence Mode dropdown to Content Analytics app

Open
#37,521 1 comment 0 reactions 1 assignee View on GitHub

@jcastro-dotcms is already working on this.

Since Sep 11, 2026.

dotCMS : Analytics Team : Falcon Type : Task
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

Epic #37349 ("Analytics: Environment Filtering") originally proposed making environment a first-class dimension of the Content Analytics pipeline, so an Authoring instance could select and read a Production instance's analytics data without creating users/roles for authorized personnel in Production.

The team has since concluded a simpler approach removes the need for cross-environment access entirely:

  • Add a new input to the Content Analytics app config that lets the user decide whether this dotCMS instance persists analytics events to the Content Analytics infrastructure, or is read-only (queries/dashboards only, no ingest).
  • Drop the idea of classifying or filtering analytics data by environment altogether. All events for a given tenant + project land in ClickHouse with no distinction of which environment emitted them, as long as the instance is configured by the Platform Team to access Content Analytics.
  • This lets a customer flip persistence on/off per instance whenever needed (e.g. stop a UAT instance from writing events) without any environment-selector UI, environment identity plumbing, or cross-environment authorization work.

This supersedes the environment-required-at-ingest decision made in #37349's 2026-09-09 amendment (formalized under the dot-ca-event-manager constitution v1.2.0, Principle II, and specced under #37407): that work is being reverted as part of this pivot. The environment column already added to the ClickHouse tables stays in place for now (no schema migration) — it's simply no longer a required, enforced ingest parameter or a filtering dimension.

UI control decided (2026-09-14, Product Director): a dropdown, not a boolean toggle. The Content Analytics app config gets a "Persistence Mode" field with explicit values — "Read & Write" and "Read Only" — leaving room to add further modes later (e.g. "Disabled") without changing the field type again.

Acceptance Criteria

  • The Content Analytics app config exposes a new "Persistence Mode" dropdown with values "Read & Write" and "Read Only"
  • Instances that already have Content Analytics configured today default to "Read & Write" after upgrade — no customer silently stops sending events
  • When Persistence Mode is "Read & Write", dotCMS core sends analytics events to the CAEM ingest endpoint exactly as it does today
  • When Persistence Mode is "Read Only", dotCMS core does not call the CAEM ingest endpoint at all — enforced core-side, no CAEM-side rejection required
  • Dashboard reads/queries work identically regardless of Persistence Mode — the setting only gates ingest, never reads
  • Changing Persistence Mode takes effect without a dotCMS restart, consistent with other Content Analytics app config values
  • Events from different environments of the same tenant + project are no longer distinguished anywhere in the pipeline — no environment selector, environment identity resolution, or cross-environment authorization is implemented
  • The environment request parameter on POST /v1/event/ingest is no longer required/non-blank-validated — omitting or blanking it no longer produces a 400 (reverts the #37407 / constitution v1.2.0 Principle II behavior)
  • Existing ingest integration tests that were updated to supply a required environment value are updated again to reflect it being optional, not deleted
  • The environment column remains in the ClickHouse raw events and aggregate tables with no migration performed as part of this change

Additional Context

  • Supersedes the environment-filtering approach in epic #37349 (not modified by this issue — team to close/amend separately)
  • Reverts the required-environment-at-ingest decision from #37349's 2026-09-09 amendment, specced under #37407 (dot-ca-event-manager, specs/003-environment-filtering/spec.md)
  • Gate: instance must already be configured/enabled for Content Analytics access by the Platform Team before this input is meaningful
  • UI decision log: 2026-09-11 left toggle-vs-dropdown open for Product; 2026-09-14 Product Director chose the dropdown control type ("Read & Write" / "Read Only" as values); 2026-09-17 the field's label was refined from "Analytics Mode" to "Persistence Mode" during spec work — it names what's actually being decided (persist or not) instead of a vague "mode"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.