Regarding Custom actions

Hi,

I am new to use Piwik . I am integrating the piwik with liferay and now i am able to tracking the pages
Now i want to add my some custom actions for what should i use.

Events
Goals
etc

and how i can use in my action class that is java class

Please help and reply

Thanks
Anil

See our user guide of Javascript tracking at JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3