How do I configure a config setting in the config.ini.php differently for a specific site?
Use this feature if you want to overwrite a setting in the config/config.ini.php
for a specific site while other ones should have a different setting.
This is currently only possible for some config settings in the [Tracker]
category and requires that you are using Matomo 4.4 or newer.
Say you want the setting enable_userid_overwrites_visitorid
to be enabled for all sites, then your config file would look like this:
[Tracker]
enable_userid_overwrites_visitorid = 1
The format to overwrite a config setting is [Tracker_{IdSite}]
where you need to replace {IdSite}
with the ID of a specific site. If you want to disable this setting for the site with the ID 42 while keeping it enabled for all other sites then you can overwrite the value for this configuration in a category [Tracker_42]
(42 is the ID of the site in this example).
[Tracker]
enable_userid_overwrites_visitorid = 1
[Tracker_42]
enable_userid_overwrites_visitorid = 0
Using the same way you can also overwrite the same setting for multiple sites:
[Tracker]
enable_userid_overwrites_visitorid = 1
[Tracker_42]
enable_userid_overwrites_visitorid = 0
[Tracker_47]
enable_userid_overwrites_visitorid = 0