Post object instead of string when using trackEvent

I’ve added some tracking code like this in my website:

_paq.push(['trackEvent', 'Car construction', 'Add wheel', wheelId]);

However, I was wondering if it was possible to add more info to this event. Something like this:

_paq.push(['trackEvent', 'Car construction', 'Add wheel', {carName: "Buick", wheelCount: 3, wheelId: wheelId}]);

It’s a made-up example, but the thing is, I want to connect more than one value/property to my event. I’ve seen this in mixpanel, but it isn’t clear from the Piwik docs how/if this is possible. So I’m guessing not, but wanted to be sure.

The last answer in this question says I “may use trackEvent with any number of custom variables.” But I’m confused, as I thought you can only pass in Category, Action, Name and Value in the trackEvent function?

Joining the question.
We have a wizard to create an event on our Events Company website. An event has many different properties, like duration in hours (numeric), category (“sales”, “anniversary” etc), premium status (“premium”, “regular”), guest number category (“<50”, “50-100”, “100+”) and others.

I would like to attach this information to every event created, and to build multiple dashboards showing the ratio of, say, “sales” VS “anniversary” events, or “premium” VS “regular” events.

I cannot use custom dimensions for these properties for 2 reasons:

  1. there might be more than 15 attributes in one event
  2. we have several entities to track on the website, and each entity has it own set of attributes.

Question: can I add event-specific attributes to a Matomo Event given that documentation mentions only 4 static properties “Category”, “Action”, “Name” and “Value”?

Hi @Iryna_Tyshko

You can define up to 50 action custom dimension:

I think you’ll have to share some dimensions from one action category to another one…
If you use custom reportspremium plugin, you can filter the report, per action category for example…