New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Tracker INI settings to be set for each website #15751
Comments
I'd like to help write this if that would help. Let me know where/how to do that, and whether my above understanding is correct and/or how you'd like it to present it instead. |
I'm actually not sure this works on a per site basis. It might actually work (and be awesome for some cases like enabling different features per site or applying different settings) but there would be some possible drawbacks like should you enable a plugin or make any other change through the UI, not all config files would be updated. This feature is actually meant for hosting multiple Matomo installations with one code base where each config file connects to a different database. If we document it, we would only support it for that case cause otherwise we'd need to implement various fixes like disabling plugins management, CORS settings, or any other feature that writes to the config file. There would be also drawbacks when archiving if you use multiple config files connecting to the same DB. When you archive data using |
@tsteur Thanks, I wasn't aware of the limitation. Perhaps I can ask about the problem that led me here: Is it possibile to change the However, I'm not sure how to do that without it affecting other sites. |
@Krinkle it's unfortunately not possible yet. I've looked at the code and this setting is used in archiving. So it could work (haven't tested) by creating a config file for that site and then running Technically, if all sites had little traffic, browser archiving could be enabled and then it would likely work. However, this would mean Matomo aggregates the reports from the raw data on demand instead of in the background making things a bit slow. Especially if the sites have a bit more traffic. I suppose a custom plugin could also do as it could technically hook into archiving events and change the config setting on demand. There are the events Wish I had a better workaround. |
see #17636 where we are allowing tracker configurations per site. Basically the format is
And these site specific settings will overwrite the regular setting. |
I learned this by digging through the code base for a while, and uncovered:
matomo/core/Config.php
Lines 149 to 151 in a345c2f
From which I deduce that in the same directory where I might have a
config/config.ini.php
file, I can also have aconfig/blog.example.org.config.ini.php
file - which, if it exists will be used instead.Also undocumented is that there can be a
/config/common.config.ini.php
file which will be used by all sites within a Matomo install before applying the per-hostname or genericconfig.ini.php
overrides.I would have expected to find this on one or both of the following doc pages:
However, these only mention
global.ini.php
(as the dont-change-this containing the software deaults) andconfig.ini.php
(as the for-all-your-sites overrides) . It seems like the documentation aboutconfig.ini.php
should be changed to be aboutcommon.config.ini.php
instead, and then add some documentation about the per-site overrides and it falling back toconfig.ini.php
.The text was updated successfully, but these errors were encountered: