Problem/Motivation
Currently it is not possible to disable tracking without disabling the module entirely.
Our uses cases are:
- Our clients sometimes need to temporarily disable tracking but don't want to lose the module config and have to reset the domain and site ID when re-enabling tracking
- We have a shared config across multiple environments and need an easy way to disable tracking on a specific environment by overriding a config key in settings.php
The matomo module has an option that does this: https://git.drupalcode.org/project/matomo/-/blob/5c36f08924771b5c001ad04...
Steps to reproduce
Proposed resolution
We could add a "Disable tracking" boolean setting.
If it is checked, piwik_pro_page_top() could return early.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork piwik_pro-3530762
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hartsak commentedThanks @prudloff!
I think this is a good idea and I would like to see this feature added to the module too.
Comment #4
hartsak commentedThanks a lot @prudloff for the MR!
I added some stuff there too, like a very simple test and some defaults for settings.
How does it look now? I also tested it myself and the new setting seems to work.
Comment #5
joonaskokko commentedLooks good to me! 👍
Comment #6
hartsak commentedThanks @joonaskokko !
I guess we can go forward with this one soon.
Comment #7
hartsak commentedTried to merge this to 1.4.x but for some reason couldn't find the Merge UI anywhere?
So I merged this from https://git.drupalcode.org/project/piwik_pro/-/merge_requests/23. Let's see how this goes.