Is it possible to segment by user instead of by visit?

Imagine I’d want to get the average duration users spent on my website for all users that have bought a watermelon.

What I can do is to create a tag for the action of buying a watermelon and then to segment by visits with these tags. This could give me the average duration users spent on my website during the visit where they bought a watermelon. What I want is the average duration for all their visits. Is there a way to get this data in Matomo Dashboard?

In a similar vein, it would be useful to be able to tell users who bought just that segment of visits instead of all visits within a given time period.

I think that you could store somewhere (cookie, user data in your database, etc.) the fact the user is interesting for you (ie he bought a watermelon in his life :wink:), and the add this info as visit dimension…
Then you’ll be able to segment by this data…