mod_analytics
Site Analytics provides lightweight local analytics for site traffic, popular content,
email activity and module-defined events. Enable mod_analytics and open
Content → Site Analytics. Configure recordings under System → Analytics configuration.
The default Languages recording starts paused and can be resumed there.
Permissions and privacy
Reports require use mod_analytics. Configuration and recording mutations require
site administrator access (use mod_admin_config); the two permissions are independent.
Request events exclude users with use mod_admin and requests marked analytics_exclude.
DNT and GPC headers do not exclude requests from aggregate analytics. With
require_consent enabled, the context must contain analytics_consent = true.
Ordinary logged-in users are otherwise eligible.
No visitor identifiers, tracking cookies or raw request logs are stored.
Recordings and storage
Each recording selects one event, fixed filters and at most one breakdown dimension. Counters are aggregated asynchronously into capped minute, quarter-hour, hour and day slots in the site's PostgreSQL database. Popular content uses bounded approximate rankings over moving periods. These are event counts, not unique visitors. Ingestion is best-effort: overload can drop events, and reports indicate incomplete data. Pausing preserves history and its storage reservation; deleting releases the reservation.
Per-site configuration:
| Key | Default | Meaning |
|---|---|---|
row_budget | 1000000 | Maximum reserved group/time slots across recordings. |
require_consent | false | Require explicit context consent for request-associated events. |
Integration
controller_page and controller_template default to the page dispatch analytics type;
controller_api defaults to api. Override with {analytics, Type}, or disable a route
with {analytics, false}. Page events count successful public HTML GET responses.
Other classified requests can include errors and expose HTTP status for filters or breakdowns.
SMTP observers count sent, retry, failed and bounced notifications independently of requests.
Modules declare namespaced events using the analytics_events fold notification and call
m_analytics:record_event/3 for background events or /4 with the current request.
See m_analytics and the application README for calling conventions and schema examples.