Add a per-deployment Matomo tracking scope, defaulting to per-subdomain:
- services.matomo.tracking.scope 'sub' (default) registers one Matomo site per
consumer subdomain with an isolated cookie; 'root' keeps the prior behaviour
of one shared site per registrable base domain with cross-subdomain linking.
- sys-front-inj-matomo derives matomo_site_domain (full host vs registrable
base) and the shared matomo_site_url from it; getSitesId / addSite and the
tracking snippet (setCookieDomain / setDomains / enableCrossDomainLinking) all
follow the scope.
- The matomo Playwright env emits MATOMO_TRACKING_SCOPE; the SitesManager test
matches the consumer's full host in 'sub' and its base domain in 'root'.
- variants.yml variant 0 sets scope=root so the matrix exercises both flavours
(every other deploy runs the sub default).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove leading dot from setCookieDomain in matomo-tracking.js.j2 to prevent
Chromium from rejecting _pk_id/_pk_ses cookies
- Refactor dashboard Playwright spec: extract console error helpers, add dedicated
matomo tracking test, fix iframeTargetUrl to use matomoBaseUrl for real
cross-subdomain coverage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch from wildcard (*.) to dot-prefix (.) notation for setCookieDomain and
setDomains. The dot-prefix follows RFC 6265 and covers all subdomain levels
including sub-sub-domains, while the wildcard only matched one level deep and
caused console errors in Chromium on OIDC/logout flows.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sets inj_enabled.matomo=false when the Matomo token is empty so the NGINX
template skips body/head snippets and avoids 'matomo_site_id is undefined'.
Removes the explicit CDN load task — CDN is now covered by the generic
frontend service loader in 01_services.yml (loaded only when needed).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use default('') so the template renders safely when
matomo_tracking_code_one_liner is not set (e.g. token not yet available).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>