Initial vault setup
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
---
|
||||
title: Matomo
|
||||
created: 2026-06-07
|
||||
updated: 2026-06-07
|
||||
type: app
|
||||
tags: [catalogue, web-analytics, privacy, self-hosted, analytics, php, mysql, mariadb, open-source, gdpr]
|
||||
confidence: high
|
||||
contested: false
|
||||
sources: [https://selfh.st/apps/?tag=web-analytics]
|
||||
---
|
||||
|
||||
# 📊 Matomo
|
||||
|
||||
> Plateforme d'**analyse web open source** de référence, fork éthique de Google Analytics, riche en fonctionnalités, conforme RGPD et auto-hébergeable.
|
||||
> Source : [selfh.st](https://selfh.st/apps/?tag=web-analytics)
|
||||
|
||||
## 📋 Métadonnées
|
||||
|
||||
| Métadonnée | Valeur |
|
||||
| :--- | :--- |
|
||||
| **Site web** | [matomo.org](https://matomo.org/) |
|
||||
| **GitHub** | [github.com/matomo-org/matomo](https://github.com/matomo-org/matomo) |
|
||||
| **License** | GPL-3.0 |
|
||||
| **Langage** | PHP 8+ / MySQL/MariaDB |
|
||||
| **Étoiles** | 2 853 |
|
||||
| **Dernière MAJ** | 2026-05 |
|
||||
| **Catégorie** | [[cat-web-analytics]] |
|
||||
|
||||
## 📝 Description
|
||||
|
||||
Matomo (anciennement Piwik) est l'une des solutions d'**analyse web open source** les plus matures du marché. Elle a été lancée en 2007 comme alternative à Google Analytics, avec pour philosophie le **respect de la vie privée** des utilisateurs finaux. Matomo propose une expérience d'analyse web **complète et professionnelle**, comparable à GA4 sur le plan fonctionnel, tout en gardant la maîtrise des données sur son propre serveur.
|
||||
|
||||
Fonctionnalités principales : **tableaux de bord personnalisables**, **heatmaps**, **session recording** (via plugin), **analyse de formulaires**, **funnels de conversion**, **suivi d'événements**, **A/B testing**, **rapports e-commerce**, **attribution multi-canal**, **API Reporting** et **API Tracking**. Plus de 100 plugins officiels ou communautaires viennent étendre les capacités de base.
|
||||
|
||||
Matomo est distribué sous licence **GPL-3.0** en version on-premise (auto-hébergée) ; une licence commerciale est nécessaire pour certaines extensions avancées (Premium, Cloud). L'architecture est basée sur **PHP** (framework maison) avec une base **MySQL ou MariaDB**, ce qui en fait une solution éprouvée mais plus lourde que [[app-umami]] ou [[app-plausible]] en termes de ressources.
|
||||
|
||||
Matomo est également disponible en mode **Cloud** (matomo.cloud) géré par l'éditeur, et dispose d'une **marketplace de plugins** très active (WordPress, Drupal, Joomla, Magento, etc.). Le projet est traduit en plus de 50 langues, dont le français.
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Option 1 : Docker Compose (recommandé)
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
matomo:
|
||||
image: matomo:5
|
||||
container_name: matomo
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
MATOMO_DATABASE_HOST: db
|
||||
MATOMO_DATABASE_ADAPTER: mysql
|
||||
MATOMO_DATABASE_TABLES_PREFIX: matomo_
|
||||
MATOMO_DATABASE_USERNAME: matomo
|
||||
MATOMO_DATABASE_PASSWORD: matomo_secure
|
||||
MATOMO_DATABASE_DBNAME: matomo
|
||||
volumes:
|
||||
- ./matomo-data:/var/www/html
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- matomo-net
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
db:
|
||||
image: mariadb:11
|
||||
container_name: matomo-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MARIADB_DATABASE: matomo
|
||||
MARIADB_USER: matomo
|
||||
MARIADB_PASSWORD: matomo_secure
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
||||
volumes:
|
||||
- ./db-data:/var/lib/mysql
|
||||
networks:
|
||||
- matomo-net
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
networks:
|
||||
matomo-net:
|
||||
driver: bridge
|
||||
```
|
||||
|
||||
Lancement :
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
# Accéder à http://localhost:8080 et suivre l'assistant d'installation web
|
||||
# Créer le compte super-utilisateur au premier démarrage
|
||||
```
|
||||
|
||||
### Option 2 : Installation manuelle (LAMP)
|
||||
|
||||
```bash
|
||||
# Prérequis : PHP 8.0+, MySQL 8 / MariaDB 10.5+, Apache/Nginx
|
||||
wget https://builds.matomo.org/matomo-latest.zip
|
||||
unzip matomo-latest.zip -d /var/www/
|
||||
chown -R www-data:www-data /var/www/matomo
|
||||
# Configurer un VirtualHost pointant sur /var/www/matomo
|
||||
# Accéder à l'URL pour finaliser via l'installateur web
|
||||
```
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
- **Matomo nécessite PHP 8.0+** avec extensions `pdo_mysql`, `gd`, `mbstring`, `curl`, `xml`, `zip`, `intl`.
|
||||
- **Paramètres d'anonymisation** : activables pour anonymiser les IP (dernier octet) et désactiver le tracking des utilisateurs uniques.
|
||||
- **Branding & White-label** : personnalisable, support de plusieurs marques/sites.
|
||||
- **JS Tracking Code** : généré automatiquement, supporte `doNotTrack` et `cookie-less tracking`.
|
||||
- **Plugins** : Market accessible depuis `Administration > Marketplace`. Recommandés : Heatmap & Session Recording, Form Analytics, Custom Dimensions, Funnels.
|
||||
- **Cron** : configurer une **tâche cron** pour l'archivage des rapports (sinon, archivage à la demande moins performant) :
|
||||
|
||||
```cron
|
||||
*/5 * * * * www-data /usr/bin/php /var/www/html/console core:archive --url=https://matomo.example.com > /var/log/matomo-archive.log 2>&1
|
||||
```
|
||||
|
||||
- **Archivage** : deux stratégies possibles — *à la volée* (par défaut, gourmand) ou *cron* (recommandé en production).
|
||||
- **Sécurité** : activation 2FA possible, IP allowlist, fail2ban recommandé.
|
||||
|
||||
## 🔄 Alternatives
|
||||
|
||||
**Open source** :
|
||||
- [[app-umami]] — plus moderne, plus léger, Node.js
|
||||
- [[app-plausible]] — privacy-first, script unique < 1 Ko
|
||||
- [[app-open-web-analytics]] — fork historique de Matomo
|
||||
- [[app-ackee]] — minimaliste, MongoDB
|
||||
- [[app-goatcounter]] — ultra-léger en Go
|
||||
- [[app-rybbit]] — concurrent moderne TypeScript
|
||||
- [[app-litlyx]] — alternative simple avec dashboard
|
||||
- [[app-swetrix]] — fork open source complet
|
||||
- [[app-vince]] — analytics Go minimaliste
|
||||
|
||||
**Propriétaire (SaaS)** :
|
||||
- **Google Analytics 4** — leader, mais problématique RGPD
|
||||
- **Matomo Cloud** — version managée officielle
|
||||
- **Adobe Analytics** — enterprise, onéreux
|
||||
- **Plausible Cloud** — payant, simple
|
||||
- **Fathom Analytics** — payant, RGPD
|
||||
- **Mixpanel** — product analytics, freemium
|
||||
- **Heap** — analytics comportemental automatisé
|
||||
|
||||
## 🔒 Sécurité
|
||||
|
||||
- **Changer immédiatement** les mots de passe par défaut et créer un super-utilisateur fort.
|
||||
- Activer la **2FA** (TOTP) pour tous les comptes admin.
|
||||
- Mettre Matomo derrière un **reverse proxy HTTPS** (Traefik, Caddy, Nginx).
|
||||
- L'IP du serveur ne doit **pas** être exposée en direct ; derrière un WAF (Crowdsec, Coraza) recommandé.
|
||||
- **Sauvegardes régulières** : `mysqldump` quotidien + `matomo-data` (config + plugins uploadés).
|
||||
- **Durcir PHP** : `open_basedir`, `disable_functions`, `expose_php=Off`.
|
||||
- Surveiller les **logs d'accès** : Matomo logge les requêtes au tracker (`misc/log/`), utiles pour détecter du trafic malveillant.
|
||||
- Mettre à jour Matomo à chaque **LTS** (toutes les ~6 semaines).
|
||||
- Activer le **Trusted Host Security** pour éviter le Host header injection.
|
||||
|
||||
## 📚 Ressources
|
||||
|
||||
- [Documentation officielle](https://matomo.org/docs/)
|
||||
- [GitHub matomo-org/matomo](https://github.com/matomo-org/matomo)
|
||||
- [Matomo Marketplace](https://plugins.matomo.org/)
|
||||
- [Guide d'installation](https://matomo.org/docs/installation/)
|
||||
- [Awesome Matomo](https://github.com/matomo-org/awesome-matomo)
|
||||
- [Tracking HTTP API](https://developer.matomo.org/api-reference/tracking-api)
|
||||
|
||||
## 🔗 Pages Liées
|
||||
|
||||
- [[cat-web-analytics]]
|
||||
- [[recettes-docker-compose]]
|
||||
- [[app-umami]]
|
||||
- [[app-plausible]]
|
||||
- [[app-open-web-analytics]]
|
||||
Reference in New Issue
Block a user