New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
piwik.js: Tracking middle clicks automatically (they do not fire onclick event) #752
Comments
see also the useful page: Javascript madness: mouse events |
vipsoft, how much effort would it be to add middle click tracking? this seems important as most users are using middle clicks to open new tabs and we might miss a significant percentage of the traffic - but I wouldn't know the effort involved? |
It shouldn't be too difficult to set up listeners for the mousedown/mouseup and add some state information... the tricky part is making it work cross-browser, and that it handles the case where the browser also fires a click. |
Middle mouse button on IE and Webkit-based browsers generate click events. |
(In [3783]) refs #409 - first party cookies
refs #739 - piwik.js improvements
refs #752 - track middle mouse button clicks (via mousedown+mouseup pseudo-click handler); defaults to tracking true "clicks"
refs #1984 - custom variables vs custom data @todo These are just stubs.
|
Mark as fixed. Future commits to #1984. |
Is there anything that needs to be done to track middle clicks, ie. enable the pseudo click handler? what is the reason for not enabling it by default? |
It is disabled by default because:
To enable:
|
See #5287 track file download and outlinks when user opens URL with Right click (opens new tab) |
There is a regression from the old piwik.js and the new one: middle clicks that open in a new tab in modern browsers, and that are more and more used, are not counted anymore: they do not fire mousedown events.
Here is Anthon's explanation:
Could we use the event.button as explained on http://www.programmersheaven.com/mb/java-script/304443/304443/right-and-middle-click/?S=B20000
Maybe there is a way of "special handling" the middle click use case and count these clicks?
The text was updated successfully, but these errors were encountered: