Integration onclick and Matomo

Is it possible to add goals and integrate official GTM onclick element also within Matomo categories like:
onclick=“ga(‘send’, ‘event’, ‘Menu’,‘Support’, ‘Contact Us’);”

Can be the same onclick which will be detected also inside Matomo tracking: Goals > Update goals: Goal Conversion tracking is one of the most efficient ways to measure and improve your business objectives.

Hi,

You can do pretty much the exact same thing with Matomo event tracking:
https://matomo.org/docs/event-tracking/

onclick="_paq.push(['trackEvent', 'Contact', 'Email Link Click', 'name@example.com']);"

So, basically, it can be replaced ga with your trackEvent

onclick="_paq.push([‘trackEvent’, ‘Menu’, ‘Support’, ‘Contact Us’]);"

Is there any other action needed as GTM demand GTM tracking code.

Can you reply please? I do not know if this will fix an issue.

Hi,

I don’t know GTM at all, so I can’t help you with GTM-related issues.

What I sent above, sends an event to Matomo (as a tracking data). If you want to send an even to Matomo Tag Manager, you can use https://developer.matomo.org/guides/tagmanager/datalayer#triggering-an-event (and then in Matomo Tag Manager act on it)