frootbox / statistics
Statistics for the Frootbox CMS: visits and page views without cookies or personal data, the most visited pages, sources and devices
Package info
github.com/frootbox-packages/statistics
Type:frootbox-extension
pkg:composer/frootbox/statistics
Requires
- php: >=8.5
- doctrine/dbal: ^4.5
- frootbox/core: ^0.1
- frootbox/database: ^0.1
- frootbox/rich-text: ^0.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/log: ^3.0
Requires (Dev)
None
Suggests
- frootbox/backend: The screen with the statistics
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-04 22:33:47 UTC
README
Statistics for the Frootbox CMS without cookies or personal data: visits and page views per day, the most visited pages, where visitors come from and their devices, on the screen "Statistics" of the backend.
How it counts
A small script (assets/count.js) on every page that visitors see sends
the target and language of the page to POST /_statistics/hit, and for
the first page of a visit the referring host (or utm_source) and the
kind of device. No cookies, no storage in the browser, no IP address, no
hash of anything: nothing tells visitors apart, so no consent is needed.
- A page view is every page that opens.
- A visit starts with a page opened from another website or none, not on a reload, with the back button or from a page of the website.
Signed-in users, the editing mode, previews, the design page, error pages, bots (by user agent) and requests from other websites count not.
Hits go into files below var/statistics/ (one line each, so a visit
costs no write to the database) and are added to the tables
frootbox_statistics_pages, …_sources and …_devices on every run of
the scheduler and before every report. Only targets with a current
address count. A day's file stops growing at 20 MB.
Query
frootbox/statistics/report.show with days (1 to 366, default 30)
returns the report, also over the REST API. The role "editor" gets
frootbox/statistics/* on installation.
Source and issues
This package is developed in the Frootbox monorepo and mirrored here read-only. Questions, bugs and ideas go there, see the documentation.