1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-21 04:43:16 +00:00

Add Google Analytics integration

This commit is contained in:
2025-07-04 16:20:12 +02:00
parent ea7abc62b0
commit d0cba14af8
6 changed files with 35 additions and 15 deletions
+3 -2
View File
@@ -22,8 +22,9 @@ Key parameters in `values.yaml`:
The frontend reads this variable at runtime so changing the deployment does
not require rebuilding the image. When empty it defaults to the internal
backend service URL.
- `adsTxt` optional content for an `ads.txt` file served by the frontend pod.
- `hpa` enable CPU-based autoscaling for both deployments.
- `frontend.googleAnalyticsId` sets `VITE_GA_ID` to enable Google Analytics.
- `adsTxt` optional content for an `ads.txt` file served by the frontend pod.
- `hpa` enable CPU-based autoscaling for both deployments.
When `firebase.enabled` is true you must create the secret before installing the chart:
@@ -30,6 +30,10 @@ spec:
name: {{ .Values.firebase.secretName }}
key: {{ .Values.firebase.configKey }}
{{- end }}
{{- if .Values.frontend.googleAnalyticsId }}
- name: VITE_GA_ID
value: {{ .Values.frontend.googleAnalyticsId | quote }}
{{- end }}
{{- if .Values.adsTxt }}
volumeMounts:
- name: ads
+2
View File
@@ -62,6 +62,8 @@ frontend:
# URL used by the frontend to reach the backend. Defaults to the
# internal service URL when empty.
backendUrl: ""
# Optional Google Analytics measurement ID
googleAnalyticsId: ""
# Content for the optional ads.txt file served by the frontend
adsTxt: ""