Text selection tracking

Hello :slight_smile:

does anyone know if you can track with matomo when the user is selecting text?

Thank you for your help



You can track everything in Matomo in Matomo by writing a line of Javascript that sends an event when something happens that you want.

For tracking user copy events you could e.g. use something like this:

document.addEventListener('copy', function(e){
    _paq.push(['trackEvent', 'copy', 'something was copied']);

With text selection it may become more complex as there is no simple browser API for it, but it should still be possible.

Please note, that this feature is really unstable in some browsers.

Thank you for your help! :sunny:
I will try something out and if I find something I’ll let you know! :slight_smile: