From 3040a22c021795fdc45857c4f9d815e2c3fd480b Mon Sep 17 00:00:00 2001 From: wuuei <9289130+wuuei@users.noreply.github.com> Date: Thu, 13 Mar 2025 15:33:00 +0100 Subject: [PATCH] Fix Matomo country logging by sending country code instead of country name Matomo expects the country code in lowercase for accurate logging and proper flag display --- module/Core/src/Matomo/MatomoVisitSender.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Core/src/Matomo/MatomoVisitSender.php b/module/Core/src/Matomo/MatomoVisitSender.php index 9fc0176a..94f25e2f 100644 --- a/module/Core/src/Matomo/MatomoVisitSender.php +++ b/module/Core/src/Matomo/MatomoVisitSender.php @@ -60,7 +60,7 @@ readonly class MatomoVisitSender implements MatomoVisitSenderInterface if ($location !== null) { $tracker ->setCity($location->cityName) - ->setCountry($location->countryName) + ->setCountry(strtolower($location->countryCode)) ->setLatitude($location->latitude) ->setLongitude($location->longitude); }