New Dashboard section shows users/sessions/pageviews for the last 7 days plus top pages, fetched server-side via the GA4 Data API using a Google service account (JWT-bearer flow, no OAuth consent screen needed) - the same approach WordPress plugins like MonsterInsights use to surface GA stats inline instead of linking out to analytics.google.com. Backend: GoogleAnalyticsReporting support class (signs its own JWT with openssl, exchanges it for an access token, calls runReport - no need for the full Google API PHP client library for one endpoint) and AnalyticsController (settings show/update, report fetch). The service account JSON key is written to a gitignored config file, mirroring the existing db.php/setup.php pattern for environment-specific secrets. Admin: new "Dashboard-Anbindung" section in Website Settings (Property ID + service account JSON paste, independent save action). Dashboard gracefully shows a setup hint when not yet configured instead of an error. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
46 lines
1.6 KiB
Text
46 lines
1.6 KiB
Text
# Dieses Repo lebt im XAMPP htdocs-Ordner zusammen mit anderen, projektfremden
|
|
# Verzeichnissen (Standard-XAMPP-Dateien, andere lokale Seiten). Nur die beiden
|
|
# HifiPlanet-Ordner (hifi/ und hifi-src/) sollen versioniert werden.
|
|
/*
|
|
!/hifi/
|
|
!/hifi-src/
|
|
!/.gitignore
|
|
!/.github/
|
|
|
|
# Von Composer/NPM regenerierbare Abhängigkeiten
|
|
/hifi/api/vendor/
|
|
/hifi-src/node_modules/
|
|
|
|
# Vite-Build-Output (wird per "npm run build" in hifi-src erzeugt und landet laut
|
|
# vite.config.js direkt in hifi/). Da emptyOutDir:false ist, sammeln sich hier über
|
|
# viele Builds hinweg tausende alte, umbenannte Chunk-Dateien an (u.a. durch das
|
|
# Code-Splitting der ~1600 Lucide-Icons im IconPicker) - das gehört nicht ins Repo.
|
|
/hifi/assets/
|
|
/hifi/index.html
|
|
/hifi/favicon.png
|
|
/hifi/robots.txt
|
|
|
|
# Umgebungsspezifische DB-Zugangsdaten (wird vom Admin-Panel automatisch neu geschrieben,
|
|
# unterscheidet sich zwischen Dev-/Live-Umgebung und gehört daher nicht ins Repo)
|
|
/hifi/api/config/db.php
|
|
|
|
# Einmalpasswort für den Ersteinrichtungs-Assistenten (siehe setup.php.example) -
|
|
# pro Umgebung unterschiedlich und darf nicht öffentlich einsehbar sein
|
|
/hifi/api/config/setup.php
|
|
|
|
# Google-Service-Account-Schlüssel für die Analytics-Data-API-Anbindung im Dashboard
|
|
# (wird vom Admin-Panel automatisch neu geschrieben, enthält einen privaten Schlüssel)
|
|
/hifi/api/config/ga-service-account.json
|
|
|
|
# Claude-Code-Tooling (Skills/lokale Einstellungen) - gehört nicht zum Website-Projekt
|
|
/hifi/.claude/
|
|
/hifi/.agents/
|
|
/hifi/skills-lock.json
|
|
/hifi-src/.claude/
|
|
/hifi-src/.agents/
|
|
/hifi-src/skills-lock.json
|
|
|
|
# Von XAMPP/Editoren erzeugte Laufzeit-/Cache-Dateien
|
|
*.log
|
|
Thumbs.db
|
|
.DS_Store
|