Skip to content
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

Richt clicks trigger twice for "All Links Click" and "All Elements Click" in Firefox #375

Closed
Starker3 opened this issue Nov 8, 2021 · 5 comments · Fixed by #376
Closed
Labels
Bug Something isn't working

Comments

@Starker3
Copy link

Starker3 commented Nov 8, 2021

It seems that Right Clicks trigger twice in Firefox for both All Links Clicks as well as All Elements Clicks

This can be reproduced with the following:
Setup an All Links Click or All Elements Click trigger (It's easier without any filters)
image

Setup a tag to send an event to Matomo
image

Open the page in a browser tab and right click any link on the page - to be 100% sure, don't click anything else in the page at all during the visit.

Check the Matomo Visits Log:
image

The exact same steps performed in Chromium do not have the same issue:
image

In the example above I have a pageview tag that sends a test event each time a page loads (Pageview trigger). The other two events are All Links Click and All Elements Click triggers.

Current Matomo version: 4.6.0-b2

This was originally reported from a Matomo Cloud user.

@mattab
Copy link
Member

mattab commented Nov 8, 2021

@Starker3 Thanks for creating the report. Could you confirm you have reproduced the issue and confirmed it?

@tsteur tsteur added the Bug Something isn't working label Nov 8, 2021
@tsteur tsteur added this to the Current sprint milestone Nov 8, 2021
@Starker3
Copy link
Author

Starker3 commented Nov 8, 2021

@mattab yes, I reproduced it in my testing instance. The screenshots were from that instance (self-hosted)

@AltamashShaikh
Copy link
Contributor

@tsteur I was able to reproduce the same and the easiest fix is to check e.which and post that initiate a callback.
Currently: Event listener for contextmenu was triggering both middle and right click

@AltamashShaikh
Copy link
Contributor

@Starker3 There is also a quick fix if we want to just track right clicks, we have a filter option called "Click button"
Refer: https://matomo.org/faq/tag-manager/how-do-i-get-the-click-triggers-to-only-trigger-on-left-middle-or-right-click/

AltamashShaikh added a commit that referenced this issue Nov 11, 2021
Fix for right click triggering middle click event too, #375
@AltamashShaikh
Copy link
Contributor

@Starker3
Added a fix for this, but we need to wait till new Matomo version is released as this plugin is shipped with core.

@innocraft-automation innocraft-automation removed this from the Current sprint milestone Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants