@heekyungyoon opened this Issue on October 26th 2016

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.

@tsteur commented on October 26th 2016 Member

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

@tsteur commented on October 26th 2016 Member

Alternatively you can always trigger a goal manually in the JavaScript tracker see https://developer.piwik.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions

@mattab commented on October 17th 2018 Member

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'

@phalox commented on August 20th 2020

Would love to have this one too. The current trigger is a little too basic...

@Clandboy commented on May 11th 2022

It'll we a great improvement ! Anyone have a solution for this ?

@LeoniePhiline commented on November 14th 2022

Is this planned for implementation at some point? Is there interest on the side of matomo?

Powered by GitHub Issue Mirror