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.69k stars 2.62k forks source link

Ability to Segment visits based on a visitor's number of visits #22309

Open 9joshua opened 3 months ago

9joshua commented 3 months ago

There is currently no default dimension that defines a visitor's overall number of visits. This is important data for marketers and others wanting to know the behaviour of, for example, one-time visitors.

The dimension would need to be stored at the visitor level, not the visit level, as a visitor-scoped dimension.

9joshua commented 2 months ago

It looks like we are already tracking this data. When pulling data via Live.getVisitorProfile this is stored in totalVisits...

<result>
    <visitorId>31a39d216d73f2e4</visitorId>
    <hasMoreVisits>0</hasMoreVisits>
    <totalVisits>1</totalVisits>
    <totalVisitDuration>1790</totalVisitDuration>
sgiehl commented 2 months ago

We currently do not support visitor scoped dimensions at all. All metrics on visitor level in Live.getVisitorProfile are calculated. We are sort of tracking this data, but it's not available in the database in a way that would make segmentation on visitor level easily possible. The visit count of a visitor for example is stored in each visits. So the first visit has stored a 1, the second visit a 2 and so on.

refs #21156, #22176

randy-innocraft commented 2 months ago

Hi @9joshua. Thank you for creating the issue and bringing this to our attention, that's very appreciated. We have reviewed and triaged this ticket internally. Our team will prioritise this, and we will update you on the progress here when we have an update to share. If you have any further information or questions, please feel free to add them here.