HifiPlanet-Website/hifi/api/database/migration_analytics.sql
Maaxxs b5de375d7f Add Google Analytics integration with consent-gated loading
Adds a "Statistik" cookie category (alongside the existing external
media one), an admin-configurable Measurement ID field in Website
Settings, and a GoogleAnalytics component that only injects gtag.js
after the visitor has consented - mirrors the existing ExternalEmbed
pattern instead of loading tracking scripts unconditionally.

Also documents Google Analytics in the Datenschutzerklärung (new
section 8, remaining sections renumbered) since introducing a new
data processing purpose requires disclosure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 01:32:44 +02:00

6 lines
335 B
SQL

-- Google Analytics Measurement ID admin-konfigurierbar machen. Additiv, nichts wird geloescht.
-- Hinweis: Auf der Live-Seite reicht stattdessen ein Klick auf "Datenbankstruktur aktualisieren"
-- unter Admin-Panel -> Einstellungen -> Datenbank.
ALTER TABLE app_settings
ADD COLUMN IF NOT EXISTS ga_measurement_id VARCHAR(20) NULL;