Matomo - Export single action from Live.getLastVisitsDetails API method


(gnanasekar) #1

Hello All,

want to export all last logins from each user this year in csv by using the matomo api. We have an event which is fired when the user logged in successfully.

Category: Login EventAction: login EventName: User logged in

When I request the following url:

https://my.analytics.domain/?module=API&method=Live.getLastVisitsDetails&idSite=1&period=year&date=2018-01-01&format=Tsv&token_auth=anonymous&segment=eventName==User%20logged%20in

I got all the visits from the user which have the eventName=User logged in in it. More or less that’s what I want. It should be only more filtered so that I only see the above event for each visit. So it should look like this:

idSite | idVisit | serverTimePretty | eventCategory | eventAction | eventName
1 | 12023 | 30.7.2018 10:21:13 | Login | login | User logged in
1 | 512 | 29.7.2018 10:27:13 | Login | login | User logged in
1 | 2522 | 28.7.2018 10:51:13 | Login | login | User logged in
1 | 1252 | 27.7.2018 10:41:13 | Login | login | User logged in


Is that somehow possible with the standard API? I also read about the CustomReports. As I understand correctly it has this functionality just with a nice Uipath. Can someone confirm this?