Skip to content
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 #17636

Merged
merged 8 commits into from May 31, 2021

Conversation

diosmosis
Copy link
Member

@diosmosis diosmosis commented May 28, 2021

Description:

This change allows INI config sections like [Tracker_$idSite] to be added which will override some Tracker config for individual sites. Config that should be applied overall (or in places where we don't know what the idSite is), cannot be overridden.

Review

  • Functional review done
  • Potential edge cases thought about (behavior of the code with strange input, with strange internal state or possible interactions with other Matomo subsystems)
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@diosmosis diosmosis added the Needs Review PRs that need a code review label May 28, 2021
@diosmosis diosmosis added this to the 4.4.0 milestone May 28, 2021
@diosmosis diosmosis force-pushed the l3-96-allow-disable-userid-overwrite branch from f3c45dd to ad37df6 Compare May 28, 2021 02:33
@diosmosis diosmosis changed the title Allow disabling userid_overwrites_visitorid behavior per site via INI config. Allow overriding some Tracker config by idSite May 28, 2021
@@ -25,7 +25,7 @@ public function init(Tracker $tracker)
{
ob_start(); // we use ob_start only because of Common::printDebug, we should actually not really use ob_start

if ($tracker->isDebugModeEnabled() && TrackerConfig::getConfigValue('enable_sql_profiler')) {
if ($tracker->isDebugModeEnabled() && TrackerConfig::getConfigValue('enable_sql_profiler', $this->getIdSite())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @diosmosis this method getIdSite doesn't seem to be defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could just remove idSite

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this one doesn't need to be overridden

@tsteur
Copy link
Member

tsteur commented May 28, 2021

@diosmosis added https://matomo.org/faq/how-to/how-do-i-configure-a-config-setting-in-the-config-ini-php-differently-for-a-specific-site/ and also added the logic for 3 more settings where this may be quite useful. Once tests pass it should be good to merge.

@tsteur
Copy link
Member

tsteur commented May 30, 2021

@diosmosis a few tests seem to need fixing and then should be good to merge

@diosmosis diosmosis merged commit e041784 into 4.x-dev May 31, 2021
@diosmosis diosmosis deleted the l3-96-allow-disable-userid-overwrite branch May 31, 2021 00:57
@mattab mattab changed the title Allow overriding some Tracker config by idSite Support for Tracker INI settings to be set for each website Jul 27, 2021
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants