mayros analytics

Manage opt-in usage analytics. View the current analytics status and force-flush buffered events. Analytics is disabled by default and requires explicit opt-in via configuration.

Subcommands

analytics status

Show the current analytics status including:

  • Enabled/disabled state
  • Privacy mode (anonymous or identified)
  • Endpoint (remote delivery URL or local-only)
  • Buffer size (number of buffered events)
  • Failure count (consecutive delivery failures)

analytics flush

Force-flush all buffered events immediately. Reports the number of events flushed. If a remote endpoint is configured, events are delivered via POST request.

Configuration

Analytics is controlled by the analytics section in mayros.toml:

KeyDescription
enabledEnable analytics collection (default: false)
privacyModeanonymous (hashes session IDs) or identified
endpointRemote endpoint URL for event delivery (optional)
maxBufferSizeMaximum events to buffer before flushing
flushIntervalMsFlush interval in milliseconds
eventTtlMsTime-to-live for buffered events

Analytics can also be disabled system-wide by setting MAYROS_ANALYTICS_DISABLED=1.

Examples

bash
mayros analytics status
mayros analytics flush