Track optionally downloads and outlinks for middle clicks and open context menu #8068
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #5287 as discussed in the issue.
There was already an opt-in flag called
enabled
to track middle clicks (I think it did not work properly BTW). I reused this one to also track "opened context menu". To use this new feature usetracker.enableLinkTracking(true)
or_paq.push(['enableLinkTracking', true]);
We can later change the default from
enabled=false
toenabled=true
.enabled=true
was set. I kinda doubt it worked since it did not consider some browser incompatibilities but there's a chance it did work. Anyway, "middle clicks" should be now tracked more accurately.right click
, orctrl+left click
on Mac,metaKey+left
click on Windows, ...)ctrl+ left click
on Windows,metaKey+left click
on Mac). It should work at least in Firefox and Chrome. It didn't work in IE10I tested in many browsers (on Saucelabs) and on some phones and it should work but one can never tell re different browser behaviour. It should be pretty safe to merge though.