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.91k stars 2.65k forks source link

Random order of events & too many => sort and group #10746

Open hpvd opened 8 years ago

hpvd commented 8 years ago

Sometimes one uses events to track multiple things of same type on one page and all these events are triggered at once. A typical example is the tracking of field validation process within a web-form (formular) One wants to understand which fields are hard to use/understand for website-users.

Typically validation is done when user clicks "send"-button. At this moment, all validation failures (empty or improper values in fields) shoot a message to the user and an "event" to Piwik. In addition there may be also an other event triggered by send button...

Doing this one got two problems


The result in visitor log may look like this:

first attempt of user to send the web-form:

second attempt

=> one can not identify easily which and how many things were corrected and solved already by the user

For another user, this may have a complete different order...


So the idea to solve this, is to give


with this it may look like

first attempt

and unfolded:

and second attempt

and unfolded:

hpvd commented 8 years ago

How could this be achieved: one need two additional options to pass for an event, which should of course be optional trackEvent(category, action, [name], [value]) => trackEvent(category, action, [name], [value], [group],[order-ID])

another or additional way would be to find a possibility to automatically sort events in vistor-log in same order as they are within website code...

mattab commented 8 years ago

Hi @hpvd For your particular use case described here, ideally it should "just work" in Piwik. Assuming you track events in the correct order, either on different time (ie. 1+ second apart), or in a bulk tracking request (where the array of request is in the chronological order), then Piwik should store events in the order of creation, and display them in visitor log in this order. How do you track the events? could you maybe create small HTML file that reproduces the issue?