Hi there,
I want Matomo to not just fire a single click event when a user clicks a certain link but I want it to fire two or even more click events.
That’s the code I am using:
<a href="#" onclick="_paq.push(['trackEvent', 'Detail Page', 'Hero → Button: Contact Company XYZ']);">Contact Company XYZ</a>
This is what I want to use:
<a href="#" onclick="_paq.push(['trackEvent', 'Detail Page', 'Hero → Button: Contact Company']); _paq.push(['trackEvent', 'All Contact Inquiries', 'Company XYZ', 'Contact Inquiries (Total)' ']); _paq.push(['trackEvent', 'All Contact Inquiries', 'Company XYZ', 'Hero → Button: Contact Company']);">Contact us</a>
So with this code
- the UX team sees how many times the hero contact button has been clicked compared to other buttons/links on a detail page
- the acquisition team immediately knows how many contact form submissions (in total) have been sent to a certain company which is featured on one of the company detail pages (This code need to be implemented behind every contact possibility on that detail page)
- The acquisition team instantly knows the number of clicks for every button/link on that company detail page.
Is there a way that Piwik generates multiple click events when a user clicks on a link?