As i understand it, there are 2 ways how we can add extra dimensions
a) Custom Dimensions - Analytics Platform - Matomo
b) create plugin with extra own dimensions (console generate:dimension)
Also i do not know, if i would create them this way, if i would have them easily accessible in the piwik, to be able to segment by them. And also i do not know what is faster etc.