Data retention
Set the number of days to keep raw visits and events:
TIDEMARK_RETENTION_DAYS=395
With a value above 0 , the scheduler runs tidemark:prune daily at 03:15. It requires the cron job.
Pruning deletes in slices of 5,000 rows, so a large backlog never holds one long database lock, and it removes events with their properties.
Run it by hand to test or to catch up:
php artisan tidemark:prune --days=395
0 keeps everything.
Caution:
Pruning is permanent and reports are computed from raw rows, so pruned periods disappear from the dashboard. Export a CSV first if you want to keep the numbers.