Matomo Plugin · Open Source · GPL-3.0
The Forecast Plugin automatically calculates future visitor numbers based on historical data – powered by Facebook Prophet, a proven AI model for time-series analysis.
Preview – Visitor Forecast (30 Days)
All features are seamlessly integrated into the Matomo interface – no separate tool, no external dashboards.
Calculates expected visitor numbers for the coming weeks daily, based on the last 12 months of historical data.
The Forecast widget can be placed on any Matomo dashboard via drag-and-drop and shows the forecast at a glance.
A full Matomo report under the "Forecast" category with export and filter options – just like any other Matomo report.
Retrieve forecast data via the Matomo HTTP API (Forecast.getForecastReport) and integrate it into your own applications.
Daily calculation via a simple cron job – fully automatic, no manual intervention required. Forecasts are ready every morning.
In remote mode only anonymised time-series data (date + visitor count) is transmitted – no personal data, no IP addresses.
Choose the mode that suits your infrastructure. Both modes produce identical results and can be switched at any time.
Matomo calls a local Python script that runs Prophet directly on your server. Your data never leaves your server at any point.
Cron Example
0 2 * * * www-data php ./console forecast:local
Matomo sends anonymised time-series data to a managed API service and retrieves the completed forecasts – no Python installation on your server needed.
Cron Example
0 2 * * * www-data php ./console forecast:remotePersist
0 4 * * * www-data php ./console forecast:remoteFetch
Prophet is an additive regression model by Meta that automatically detects trends, seasonality and holidays.
The plugin reads the last 12 months of visit data from the Matomo database.
The AI model detects trends, weekly patterns and seasonal effects and computes the forecast.
The forecasts are stored in the forecast_access_count table.
Widget, report and API are immediately available – no page reload or reconfiguration needed.
Installation follows the standard Matomo process and requires no complex dependencies.
Matomo
5.0+
PHP
7.2.5+
Python (local)
3.8+
Quick Start – Local Mode
1. Copy the plugin directory
cp -r Forecast/ /var/www/html/plugins/
2. Activate the plugin & update the database
./console plugin:activate Forecast
./console core:update
3. Install Python dependencies
cd plugins/Forecast/Prophet
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
4. Run for the first time
su www-data -s /bin/bash -c "php -d memory_limit=-1 ./console forecast:local"
The HTTP API returns structured forecast data that can easily be integrated into any application.
Request
?module=API
&method=Forecast.getForecastReport
&idSite=1
&period=day
&date=today
&format=json
Response
[
{
"label": "2026-03-25",
"nb_visits": 1247
},
{
"label": "2026-03-26",
"nb_visits": 1389
}
]