HifiPlanet-Website/hifi/api/database
Maaxxs 24df7a602c Add Google Analytics dashboard widget (GA4 Data API integration)
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>
2026-07-07 01:57:32 +02:00
..
migration_2fa.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_analytics.sql Add Google Analytics integration with consent-gated loading 2026-07-07 01:32:44 +02:00
migration_analytics_dashboard.sql Add Google Analytics dashboard widget (GA4 Data API integration) 2026-07-07 01:57:32 +02:00
migration_mail_settings.sql Add configurable SMTP email settings and contact-form email notifications 2026-07-07 00:54:17 +02:00
migration_maintenance.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_permissions.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_services.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
migration_site_settings.sql Add admin-configurable website settings and VIN field to contact form 2026-07-06 15:28:11 +02:00
migration_upgrades.sql Initial commit: HifiPlanet Car-Hifi Shop (Frontend + Backend) 2026-07-05 13:37:06 +02:00
schema.sql Add Google Analytics dashboard widget (GA4 Data API integration) 2026-07-07 01:57:32 +02:00