From 184ee250115378b7d9c86574273222269f9cf8e7 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 3 Sep 2025 11:53:27 +0200 Subject: [PATCH] fix(analytics): Matomo analytics (#817) * fix: Matomo analytics * chore: use with * Revert "chore: use with" This reverts commit 1d86e6fa0f7efa992a25f792c0ed5b9e76eeafa4. --------- Co-authored-by: Xin --- layouts/_partials/components/analytics/matomo.html | 12 ++++++++++++ layouts/_partials/components/analytics/umami.html | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/layouts/_partials/components/analytics/matomo.html b/layouts/_partials/components/analytics/matomo.html index ac91651..02b81b5 100644 --- a/layouts/_partials/components/analytics/matomo.html +++ b/layouts/_partials/components/analytics/matomo.html @@ -3,6 +3,16 @@ Matomo Analytics. https://developer.matomo.org/guides/tracking-javascript-guide */ -}} +{{- with .Site.Params.analytics.matomo -}} + +{{- if not .serverURL }} + {{- errorf "Missing Matomo 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#matomo-analytics" -}} +{{- end -}} + +{{- if not .websiteID }} + {{- errorf "Missing Matomo 'websiteID' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#matomo-analytics" -}} +{{- end -}} + + +{{- end -}} diff --git a/layouts/_partials/components/analytics/umami.html b/layouts/_partials/components/analytics/umami.html index 814dd55..9cb3ae4 100644 --- a/layouts/_partials/components/analytics/umami.html +++ b/layouts/_partials/components/analytics/umami.html @@ -6,11 +6,11 @@ https://umami.is/docs/tracker-configuration {{- with .Site.Params.analytics.umami -}} {{- if not .serverURL }} - {{- errorf "Missing Umami 'serverURL' configuration. See TODO" -}} + {{- errorf "Missing Umami 'serverURL' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#umami-analytics" -}} {{- end -}} {{- if not .websiteID }} - {{- errorf "Missing Umami 'websiteID' configuration. See TODO" -}} + {{- errorf "Missing Umami 'websiteID' configuration. See https://imfing.github.io/hextra/versions/latest/docs/guide/configuration/#umami-analytics" -}} {{- end -}} {{- $attributes := newScratch -}}