Files
computer-playbook/roles/sys-front-inj-matomo/vars/main.yml
kevinveenbirkenbachandClaude Opus 4.8 c0e4e3934b fix(matomo): extract base domain for root tracking scope via double-quoted scalar
matomo_site_domain used a folded YAML scalar where the regex_replace backslashes are
not unescaped, so base-domain extraction silently returned the input unchanged. In
root tracking scope this registered one Matomo site per consumer subdomain instead of
a single shared registrable-domain site, failing the SitesManager coverage spec.
Use a double-quoted scalar (repo convention) so the regex sees an escaped dot.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 12:24:18 +02:00

6 lines
417 B
YAML

---
matomo_tracking_scope: "{{ lookup('config', 'web-app-matomo', 'services.matomo.tracking.scope') }}"
matomo_site_domain: "{{ domain if matomo_tracking_scope == 'sub' else (domain | regex_replace('^(?:.*\\.)?(.+\\..+)$', '\\1')) }}"
matomo_site_url: "{{ lookup('tls', application_id, 'protocols.web') }}://{{ matomo_site_domain }}"
matomo_index_php_url: "{{ lookup('tls', 'web-app-matomo', 'url.base') }}index.php"