Use piwik to track all event on my page

Dear all,

I have installed and configured the Piwik 2.4.0-b6.

I have added the Tracking Code in my Master page to track all the page views and I Am able to see that counts in my piwik dashboard.

Now i need to track all the event (user interactions) like button click, hyperlink click etc., and i dont want to add the code in every page, instead i need to add that code in one place (like master page) and i should track all events in all the pages.

How can i implement this.

Note:
Right now, I Am tracking the event by adding the java script in each and every click events in every pages.

Many Thanks,

Hi there, maybe the user guide for JavaScript tracking will help you? JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3