Track click event and return additional information

Hi,

Is there a way when (eg. on click a button), It will track the no. of clicks and Additional information returned in json format - eg. total amount, product name, product description etc. and have this information to viewable from matomo?

I am using the on premise matomo.

Thanks.