matomo-org / tag-manager

Free Open Source Matomo Tag Manager - A simple way to manage and maintain all of your (third-party) tags on your website.
https://matomo.org
GNU General Public License v3.0
170 stars 58 forks source link

Require consent for heatmaps and session recordings only #612

Open SW-Vincent opened 1 year ago

SW-Vincent commented 1 year ago

Add a "Require consent for heatmaps and session recordings" checkbox within Tag Manager configuration variable (right under the "Require tracking consent" checkbox).

Summary

As you may know, CNIL configuration guide for a consent exempted use of Matomo requires to disable Heatmaps and Session recordings. Making it easier for Matomo Tag Manager users to ask consent for heatmaps and session recordings would be a great feature !

Note : at the moment, disabling heatmap / session recordings makes it impossible to ask user consent and also erases all historical data for them.

Your Environment

snake14 commented 1 year ago

Hi @SW-Vincent . Thank you for taking the time to create this issue. That sounds like an interesting idea for an enhancement. I'll add it to our backlog to be investigated and prioritised.

Stan-vw commented 1 year ago

Thanks for creating this ticket @SW-Vincent . I'm looking into whether we can potentially pick this up in the upcoming few months, and I'm wondering what the appropriate UX flow here is.

Some considerations (mainly for getting my own thoughts straight)

What I'm not 100% sure of:

If that's what you have in mind, my return questions would be:

SW-Vincent commented 1 year ago

Hi, to answer your questions :


If the "require consent" option for Heatmaps and Session recordings becomes a native option of Matomo, it would be a good thing to consider updating the CNIL x Matomo configuration guide (although I assume it is no simple task).

Note : at the moment we are trying to set a workaround based on https://developer.matomo.org/guides/heatmap-session-recording/reference. We would sent _paq.push(['HeatmapSessionRecording::disable']); as a fallback and _paq.push(['HeatmapSessionRecording::enable']); on consent, but this solution hasn't been tested yet and not all consent manager solutions have fallbacks (also we expect some issue related to the code not being send at the good timing).