Matomo Plugin · Open Source · GPL-3.0

Visitor Forecasts for Your
Matomo Instance

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)

Today Historical Forecast Confidence Band

30+

Days Forecast Horizon

2

Operating Modes (Local & Remote)

GDPR

Privacy‑Compliant

GPL‑3

Open‑Source License

What the Plugin Can Do

All features are seamlessly integrated into the Matomo interface – no separate tool, no external dashboards.

Time-Series Forecast

Calculates expected visitor numbers for the coming weeks daily, based on the last 12 months of historical data.

Dashboard Widget

The Forecast widget can be placed on any Matomo dashboard via drag-and-drop and shows the forecast at a glance.

Forecast Report

A full Matomo report under the "Forecast" category with export and filter options – just like any other Matomo report.

HTTP API Access

Retrieve forecast data via the Matomo HTTP API (Forecast.getForecastReport) and integrate it into your own applications.

Cron Automation

Daily calculation via a simple cron job – fully automatic, no manual intervention required. Forecasts are ready every morning.

GDPR-Compliant

In remote mode only anonymised time-series data (date + visitor count) is transmitted – no personal data, no IP addresses.

Two Operating Modes – One Plugin

Choose the mode that suits your infrastructure. Both modes produce identical results and can be switched at any time.

Mode 1

Local Execution

Matomo calls a local Python script that runs Prophet directly on your server. Your data never leaves your server at any point.

  • Full data control – everything stays on your server
  • No external API key required
  • Ideal solution for on-premises instances
  • Requires Python 3.8+ with Prophet, pandas & joblib

Cron Example

0 2 * * * www-data php ./console forecast:local
Mode 2

Remote API Service

Matomo sends anonymised time-series data to a managed API service and retrieves the completed forecasts – no Python installation on your server needed.

  • No local Python installation required
  • Ideal for managed hosting without shell access
  • Only date + visitor count are transmitted
  • API key & hostname required

Cron Example

0 2 * * * www-data php ./console forecast:remotePersist 0 4 * * * www-data php ./console forecast:remoteFetch

How Does the Forecast Work?

Prophet is an additive regression model by Meta that automatically detects trends, seasonality and holidays.

1

Collect Data

The plugin reads the last 12 months of visit data from the Matomo database.

2

Prophet Calculates

The AI model detects trends, weekly patterns and seasonal effects and computes the forecast.

3

Store Results

The forecasts are stored in the forecast_access_count table.

4

Display in Matomo

Widget, report and API are immediately available – no page reload or reconfiguration needed.

Ready in Minutes

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"

API Response Format

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 } ]

Interested in the Remote API Service?

To use remote mode you need an API key and hostname. Simply get in touch – we will respond promptly.

Open Source

Licensed under GPL-3.0+ · Compatible with Matomo 5.0+