- 🇩🇪Germany szeidler Berlin
I think the problem is, that the Matomo Drupal Module only passes the `setDoNotTrack` setting to Matomo, if it is enabled. It's implemented in https://git.drupalcode.org/project/matomo/-/blob/8.x-1.x/matomo.module?r...
In that case (and only if the checkbox is disabled) it will fallback to the global "Do not track" setting you have configured in Matomo itself. That is by default respecting the "Do not track" Header and therefore would not collect data for users having the option enabled in their browser.
It's a bit confusing, because the site manager in Drupal would expect that the checkbox setting has a direct consequence, no matter the global setting on the Matomo server is.
I would recommend to explicitly pass the setting to Matomo always like configured in the Drupal backend. This will be clearer and leads to no surprises for that matter.
- Status changed to Needs review
over 1 year ago 10:10am 21 July 2023 - Open on Drupal.org →Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - 🇩🇪Germany szeidler Berlin
Here's a patch for it. It always will set the following based on the checkbox configured in the Drupal Matomo settings form.
_paq.push(["setDoNotTrack", "true"]
or
_paq.push(["setDoNotTrack", "false"]
Then the tracking will always respect the configuration of the module and not invoke the Matomo default settings.
- 🇩🇪Germany szeidler Berlin
Hm, apparently according to my first test, Matomo still falls back to the Matomo server setting.
- Status changed to Active
over 1 year ago 12:41pm 21 July 2023 - 🇩🇪Germany szeidler Berlin
Apparently the DNT support gets deprecated in Matomo 5. So it might be absolutely alright to already ditch the support in your installation by disabling the feature globally in the the Matomo server configuration. https://matomo.org/changelog/matomo-5-0-0-beta/