Kai Ole Hartwig — Blog
Matte-schwarze Server-Edge-Box im Rack-Vordergrund mit sage-grünen Patch-Kabeln — Metapher für präzise Analytics ohne Überwachung.
AI-generated · gpt-image 2.0

fa4t3 — Fathom Analytics directly in the TYPO3 backend.

Privacy-focused web analytics for TYPO3 14 — no third-party cookies, no GDPR consent banner needed for tracking. fa4t3 integrates Fathom Analytics into the backend: dashboard module, per-page metrics in the page tree, and optional tracking script injection via middleware.

  • Composer package:moselwal/fa4t3
  • TYPO3: 14.x · PHP: 8.5+ · GPL-2.0-or-later

Analytics without a cookie banner — or none at all.

Mit fa4t3

  • Fathom Analytics: kein Cookie, kein Consent-Banner, DSGVO-konform by design
  • Backend-Dashboard direkt in TYPO3 — keine externen Logins für Redakteure
  • Seitenspezifische Metriken im Seitenbaum sichtbar
  • Tracking-Script-Inject per Middleware — kein TypoScript nötig

Bisher

  • Google Analytics mit Cookie-Consent-Banner — Nutzer lehnen ab, Daten fehlen
  • Externe Dashboards: Redakteure müssen zwischen TYPO3 und Analytics-Tool wechseln
  • DSGVO-Compliance erfordert Datenschutzbeauftragten, AVV, Cookie-Opt-In
  • Tracking-Script manuell per TypoScript einbinden und aktuell halten

What fa4t3 provides

Dashboard-Widgets

Integration in typo3/cms-dashboard: Seitenaufrufe, Top-Seiten, Referrer und Browser/Geräte als konfigurierbare Widgets.

Tracking-Inject

Optionaler Inject des Fathom-Tracking-Scripts per Middleware — keine manuelle TypoScript-Konfiguration nötig.

Seiten-Metriken

Pro-Seite-Metriken im TYPO3-Seitenmodul — jeder Redakteur sieht die Performance seiner Seite ohne externen Login.

Backend-Dashboard

Eigenes Backend-Modul mit Fathom-Analytics-Daten — Seitenaufrufe, Besucher, Verweildauer und Top-Seiten direkt in TYPO3.

Dashboard widgets

When typo3/cms-dashboard is installed, fa4t3 provides configurable widgets for the TYPO3 dashboard:

WidgetContent
Page viewsPageviews over time as a trend chart
Top pagesMost visited pages with view counts
Referrer sourcesWhere visitors come from (direct, Google, social, …)
Browser/devicesBreakdown by browser and device type

Each widget is standalone and can be added independently to the TYPO3 dashboard layout. Without typo3/cms-dashboard, the backend module remains fully available.

Installation and configuration

Installation

 

composer require moselwal/fa4t3

 

Requirements: PHP 8.5+ · TYPO3 14.x · Fathom Analytics account with API key

Configuration

  1. Generate an API key in your Fathom dashboard
  2. Set the extension configuration in the TYPO3 backend
  3. Add your Site ID to the site configuration for frontend tracking (optional)

Site configuration integration

 

# config/sites/main/config.yaml
fa4t3ApiKey: '%secret(FA4T3_API_KEY)%'
fa4t3Password: '%secret(FA4T3_PASSWORD)%'

 

The %secret()% placeholder is resolved at runtime by moselwal/secret-resolver — recommended for production environments with Docker Secrets or Vault.

Optional dependencies

PackageTypePurpose
typo3/cms-dashboardOptionalDashboard widget support
moselwal/secret-resolverOptionalSecure API key resolution

Architecture

fa4t3 follows TYPO3’s standard extension structure with clearly separated layers:

 

Classes/
├── Controller/      # Backend module controllers
├── Domain/          # Models and repositories
├── Exception/       # Domain-specific exceptions
├── Middleware/      # Frontend tracking script injection
├── Service/         # Fathom API client and data services
└── Widgets/         # TYPO3 Dashboard widgets

 

The service layer encapsulates all Fathom API communication and uses TYPO3’s Caching Framework — API responses are cached so repeated backend calls do not trigger additional API requests. After changes in the Fathom dashboard, vendor/bin/typo3 cache:flush is sufficient.

The middleware injects the Fathom tracking script into all frontend responses — no TypoScript, no PAGE object modification needed. The Site ID comes from the TYPO3 site configuration.

Secure secret management

For production environments I recommend moselwal/secret-resolver instead of plain-text API keys in the site config:

 

# config/sites/main/config.yaml
fa4t3ApiKey: '%secret(FA4T3_API_KEY)%'
fa4t3Password: '%secret(FA4T3_PASSWORD)%'

 

secret-resolver resolves the placeholder at runtime — cascading from FA4T3_API_KEY_FILE env (file path), then /run/secrets/fa4t3_api_key mount. For HashiCorp Vault or AWS Secrets Manager as extended providers: %secret(vault:kv-v2/fa4t3.apiKey)%.

Why this is better than plain env variables: env vars are visible in the process, end up in phpinfo() output and CI/CD logs. secret-resolver reads values on demand from encrypted sources — never globally in the process environment.

Packagist

composer require moselwal/fa4t3

Paket auf Packagist →
Packagist

GitHub

Quellcode, Issues und Changelogs. GPL-2.0-or-later.

Auf GitHub ansehen →
GitHub

Set up analytics the privacy-first way?

fa4t3 is open source and compact. I am happy to help with Fathom onboarding, API key management with secret-resolver, or a complete TYPO3 analytics strategy.

Where I use it …

I use fa4t3 on my own sites and for clients who also rely on Fathom Analytics. No cookie banner needed, and I still get meaningful insight into what content actually lands.