From 2b1430055f22d7e9d436159e073a4e8a776c3e74 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Wed, 14 Jan 2026 23:08:38 +1100 Subject: [PATCH] fix(matomo): respect user-provided URL protocol instead of forcing HTTPS Closes #571 --- src/runtime/registry/matomo-analytics.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/registry/matomo-analytics.ts b/src/runtime/registry/matomo-analytics.ts index 0a3ddebf..f1b48cc0 100644 --- a/src/runtime/registry/matomo-analytics.ts +++ b/src/runtime/registry/matomo-analytics.ts @@ -23,7 +23,7 @@ interface MatomoAnalyticsApi { } declare global { - interface Window extends MatomoAnalyticsApi {} + interface Window extends MatomoAnalyticsApi { } } export function useScriptMatomoAnalytics(_options?: MatomoAnalyticsInput) { @@ -65,7 +65,7 @@ export function useScriptMatomoAnalytics(_options? _paq.push(['disableCookies']) } if (options?.trackerUrl || options?.matomoUrl) { - _paq.push(['setTrackerUrl', options?.trackerUrl ? withHttps(options.trackerUrl) : withBase(`/matomo.php`, withHttps(options?.matomoUrl || ''))]) + _paq.push(['setTrackerUrl', options?.trackerUrl ?? withBase(`/matomo.php`, options?.matomoUrl || '')]) } else if (normalizedCloudId) { _paq.push(['setTrackerUrl', withBase(`/matomo.php`, withHttps(normalizedCloudId))])