I defined several events with same event category and different event actions.
In order to distinguish these events, I need to define goals based on multiple conditions. (for example, event category contains 'fruit' and event action contains 'apple'.)
However, currently Piwik doesn't seem to support this function.
It is not possible yet indeed. It would be possible in a plugin with some effort but there are not really public / supported APIs for it to do it easily. If you are familiar with PHP you could develop a plugin that listens to a Piwik PHP event makeNewVisitObject. In this event you could probably leave the
$visit untouched but set a goalId dynamically if the tracking request matches your conditions eg
preg_match($_GET['e_c']...) && preg_match($_GET['e_a']...) then
$_GET['idgoal'] = 10
A workaround is also to make event names (or categories, or actions), more specific, so that you can match them to Goals. So in your example:
(for example, event category contains 'fruit' and event action contains 'apple'.)
you could use category = 'fruit', action = 'fruit - apple'
Would love to have this one too. The current trigger is a little too basic...
It'll we a great improvement ! Anyone have a solution for this ?
Is this planned for implementation at some point? Is there interest on the side of matomo?