Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

API, Amount of visits by Users in a certain period

$
0
0

@Stijn wrote:

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
VisitsSummary.getVisits&period=month&date=2016-02-01&segment=userId==Y
VisitsSummary.getVisits&period=month&date=2016-02-01&segment=userId==Z

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.

Regards,
Stijn

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles