Create plugin that can be configured to not track in private mode #16040
Labels
c: New plugin
For features that probably will not be added to Matomo, but could be implemented as plugins.
c: Privacy
For issues that impact or improve the privacy.
Help wanted
Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone
Once installed from the marketplace or so, by default visitors would not be tracked if incognito mode is detected. There would be some JS tracker method to still allow tracking in incognito mode. Private browser window is not easy to detect but there some scripts like https://gist.github.com/jherax/a81c8c132d09cc354a0e2cb911841ff1 which could be used. Might not work perfectly but may be better than nothing.
This be actually fairly easy to develop see https://developer.matomo.org/guides/enrich-js-tracker
Basically put a
tracker.js
file into the plugin and add some code to detect incognito mode. The problem is actually to get the tracker to not send a tracking request. This might require a small addition to the core JS tracking code as we can't use do not track for this and neither any of the opt out code (as this can cause setting cookies or the deletion of cookies). A workaround be to set some random tracker URL so it won't actually send any request but this can have side effects.It be generally easy to add this to the core JS though and be happy to help with this.
The text was updated successfully, but these errors were encountered: