Matomo Setup¶
This guide covers setting up Matomo analytics for OSGEO-Inject.
Overview¶
Matomo tracks badge impressions across all participating sites, providing:
- Page view counts per site
- Geographic distribution
- Traffic patterns
NixOS Configuration¶
Initial Setup¶
- Access Matomo at
https://matomo.affiliate.osgeo.org - Follow the installation wizard
- Create a site with ID 1 for OSGEO-Inject
- Note the tracking code (already integrated)
Configuration¶
Site Setup¶
Create a site in Matomo for OSGEO-Inject:
- Name: OSGEO-Inject
- URLs: All participating OSGeo project domains
- Type: Website
Privacy Settings¶
Configure privacy-respecting settings:
- IP Anonymization: Enable (mask last 2 bytes)
- Do Not Track: Respect
- Data Retention: 180 days
Tracking Implementation¶
The JavaScript uses pixel tracking:
const params = new URLSearchParams({
idsite: 1,
rec: 1,
url: window.location.href,
action_name: document.title,
});
const img = new Image();
img.src = `${matomoUrl}/matomo.php?${params}`;
Reports¶
Useful Reports¶
- Visitors > Overview: Total impressions
- Behavior > Pages: Top pages
- Visitors > Locations: Geographic distribution
Custom Segments¶
Create segments for specific projects:
- QGIS:
pageUrl=@qgis.org - PostGIS:
pageUrl=@postgis.net
Maintenance¶
Database Optimization¶
Archive Processing¶
Backup¶
Matomo data is included in system backups: