Session Computation Command
Themautic:analytics:rebuild command processes page hits from Mautic’s tracking and computes visitor sessions.
Options
| Option | Description |
|---|---|
| (none) | Incremental update - processes only new hits since last run |
--rebuild | Full rebuild - truncates tables and reprocesses all data |
--days=N | Limit rebuild to last N days (use with --rebuild) |
Usage Examples
Incremental Update (Default)
Full Rebuild
Rebuild Last 90 Days
Rebuild Last 7 Days
Cron Setup
For real-time analytics, run the command regularly via cron:Output
The command outputs statistics about its run:- How many page hits were processed
- How many sessions were created
- How long the processing took

