matomo-org/matomo

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

Open

#16 040 ouverte le 8 juin 2020

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)PHP (2 847 forks)batch import
Help wantedc: New pluginc: Privacytriaged

Métriques du dépôt

Stars
 (21 513 stars)
Métriques de merge PR
 (Merge moyen 8j 11h) (106 PRs mergées en 30 j)

Description

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.

Guide contributeur