@sgiehl opened this Pull Request on January 17th 2022 Member

Description:

fixes #18625

Review

@sgiehl commented on January 20th 2022 Member

BTW can this also be used to disable geolocation? We've had few people asking for this in the past and if so, we should create a separate FAQ

Actually this only disables the fallback. So if no geolocation provider is configured -> the default is used guessing the country by the language will still be done. But if we want to make that possible, we could simply create some kind of Dummy provider, which always returns an empty result set.

@tsteur commented on January 20th 2022 Member

@sgiehl getting bit confused. So if we disable enabled_geolocation_guess_country_fallback, then there's still some guessing and a fallback happening within the default provider? That might be getting bit confusing as there's then also a different guessing happening?

Also I see there's a setting [Tracker]enable_language_to_country_guess. Would that mean this config should be in Tracker category too?

@sgiehl commented on January 20th 2022 Member

Guess could make sense to move it to Tracker. The default provider is doing the language to country guess.
If you have configured e.g. GeoIP2 and this provider doesn't return any results then the GeoLocator falls back to the default provider. And that fallback can be disabled with the config. By default Matomo uses the default provider and that currently can't be disabled.
Hope that makes it a bit clearer.

@tsteur commented on January 20th 2022 Member

Does it make sense in that case to name the setting like enable_default_location_provider?

When disabled, we use a Dummy provider. This way we can tackle this specific use case, plus we can also handle the use case for disabling geolocation altogether if I see this right? Also the name would be a bit more clear maybe and it be easier to explain/understand.

Would also need some FAQs then.

@sgiehl commented on January 21st 2022 Member

@tsteur I've now adjusted everything a bit again. We now have a new Disabled provider. If that one is chosen geolocation is disabled. The current default provider is still used as default and fallback unless the Tracker option enable_default_location_provider is disabled. In that case the Disabled provider will be used as default and fallback.
Hope that makes everything a bit easier to understand.

@sgiehl commented on January 26th 2022 Member

As of Matomo 4.8. there will be a new config setting [Tracker] enable_default_location_provider = 0, which can be used to disable the default geolocation provider. That way the fallback to this provider can also be disabled.

This Pull Request was closed on January 26th 2022
Powered by GitHub Issue Mirror