Elementor's button tracking with Matomo

Hello,

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.

What would be the best solution here?

Any info is much appreciated Thanks!

You can set a Trigger with “All element click” and the set a filter that target all the elements inside a given parent element with a css class:

ElementClick > Match the CSS Selector > .name_class *

Example:

Button Text

The related filter:

ElementClick > Match the CSS Selector > .button-link *

@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?