Adding new query param to Tracking url

Hello everyone,

I am new to piwik. Wanted to know if it is possible to add a new query param to tracking request to piwik? I read about ActionDimention here - ActionDimension - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

My understanding is if I have a new query param, I can get this param value and set to a new column in log_link_visit_action using onNewAction. Please correct me if I am wrong.

My requirement is to add a new value (user roles) and create a report with all the events grouped by user roles , user id and page title. Is there any other way to track new value - user role in piwik ?

Appreciate any help on this.

Thanks in advance !!
Raveendra