We’re facing issues tracking button clicks with Matomo on a website built with Elementor.
Since Elementor buttons are actually < a > elements wrapped in multiple divs, styled to look like buttons, we can’t get {{Click ID}} or {{Click Classes}} to work. The buttons don’t have unique text either (there are too many buttons that we want to track).
We also can’t use URL builder because UTMs get lost by default after the first click.
@Miroslav_Zeljkovic
You can track button clicks in Elementor with Matomo by using a CSS selector in your trigger settings. Set a trigger for “All element click” and apply a filter to target the elements inside a specific parent container. For example, you could use:
ElementClick > Match the CSS Selector > .your-parent-class .button-class *
This way, you can effectively track all button clicks without needing unique IDs or texts. Have you tried this approach, or do you have any specific CSS classes in mind that you’d like to use?