matomo-org/matomo

Create plugin that can be configured to not track in private mode

Open

#16.040 aperta il 8 giu 2020

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)PHP (2847 fork)batch import
Help wantedc: New pluginc: Privacytriaged

Metriche repository

Star
 (21.513 star)
Metriche merge PR
 (Merge medio 8g 11h) (106 PR mergiate in 30 g)

Descrizione

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.

Guida contributor