The setDoNotTrack configuration value has to be pushed to the _paqs before the trackPageView setting. trackPageView seems to trigger the actual logging request when it is being processed.
With the old state of the code, setDoNotTrack was set too late and never became effective. A request to the Matomo server would be sent in any case, relying on the server-side "do not track" privacy feature to be enabled.
This change adds a new enable_do_not_track configuration setting which defaults to true.
When you set it to false, the setDoNotTrack command will not be used. You can push it to the _paq array yourself, possibly depending on client-side logic. But remember: It has to be in the _paq array before the trackPageView entry.
The
setDoNotTrack
configuration value has to be pushed to the_paq
s before thetrackPageView
setting.trackPageView
seems to trigger the actual logging request when it is being processed.With the old state of the code,
setDoNotTrack
was set too late and never became effective. A request to the Matomo server would be sent in any case, relying on the server-side "do not track" privacy feature to be enabled.This change adds a new
enable_do_not_track
configuration setting which defaults totrue
.When you set it to
false
, thesetDoNotTrack
command will not be used. You can push it to the_paq
array yourself, possibly depending on client-side logic. But remember: It has to be in the_paq
array before thetrackPageView
entry.