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
This commit is contained in:
wuuei
2025-03-13 15:33:00 +01:00
committed by GitHub
parent 5eb1808217
commit 3040a22c02

View File

@@ -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);
}