matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.68k stars 2.62k forks source link

When adding a goal triggered from an event, let me define events with AND conditions #10791

Open heekyungyoon opened 7 years ago

heekyungyoon commented 7 years ago

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 7 years ago

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 7 years ago

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 5 years ago

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 4 years ago

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

Clandboy commented 2 years ago

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

LeoniePhiline commented 1 year ago

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

atom-box commented 11 months ago

I am working on setting up Matomo to mirror what our client had in GA Universal. I don't see how I can add multiple definitions for triggering a goal like I can in UA. Please let me know if in fact this is the significant limitation. Universal Analytics goals ... can have multiple conditions image

(from a Matomo user)

atom-box commented 11 months ago

This github post is 5 years old - does Matomo plan to upgrade this capability to be in alignment with how Google UA was?

(from a Matomo user)

mattab commented 9 months ago

Lots more requests for this issue in

Had a customer today asking how they could easily setup a goal with multiple event values - "Is it not possible to easily add several conditions for an event, ie a CATEGORY + label + action? That seems basics and I cant figure out"

and

I'm surprised this is not implemented and that we have to do workarounds to make this work.

and

Yes, it would be much more useful if Event Category, Action, and Name could all be defined for a certain goal.

and

Currently, one can trigger a goal based solely on one characteristic of an event (category or name or . It could be great to give the possibility to do it with multiple event fields, like event category AND event name.