API, Amount of visits by Users in a certain period

Once a user logs in into our website, we track their user id. We want to use the API to get the amount of visits by user for a certain set of users. I could not find any API which achieve this goal.

So let’s say I want to know the amount of visits of user X, Y and Z. I was thinking of a result like this:
{ “X”: 10, “Y”: 8, “Z”: 12 }

All I could find would be to use 3 requests, or possibly the bulk request: VisitsSummary.getVisits&period=month&date=2016-02-01&segment=userId==X

When retrieving 3 users this is fine, but what if would like to retrieve for example 100 users?

What would be the recommended approach? If needed we could retrieve all users using the api and only display certain users in our UI.


Hi Stijn

This feature is currently in development by a community member. We hope this will be added to Piwik in a future version. See: New report listing all User ID, in Visitors > Users by alexkuk · Pull Request #9883 · matomo-org/piwik · GitHub

Thank you for the information. What to expect when you say: “We hope this will be added in the future”? Are we talking about weeks, months or years? And how likely is it going to be implemented?

We don’t know yet, it depends on what the contributor does.