Comma in data field for CSV

(Collin Keen) #1

hello, relatively new to the developer side of Matomo. I am trying to use the API to download a report of users within the last month, but when I do that as CSV, the browser description fields sometimes don’t bind the field with double quotes, and the field always contains a comma. Obviously this causes issues trying to import, and I need to correct for it but don’t know how. I am using the live.getlastvisitdetails API to get this information; In an ideal world, I really only need the login date and User ID, but I can’t find a way to get just that. This API gets more than I need, but the CSV is generating badly.

Thanks for any help or suggestions.

(Lukas Winkler) #2


Can you maybe reproduce the issue on ?

(Collin Keen) #3

Actually now that I am re-running it, the output seems fine. Problem now is the export via the API only seems to return 100 rows. Here are the parameters I am using, I am trying to get visitors within the last month - myURL/?module=API&method=Live.getLastVisitsDetails&idSite=13&period=day&date=last%20month&doNotFetchActions=1&format=csv&token_auth=mytoken

(Lukas Winkler) #4


Adding &filter_limit=-1 should fix that. (See Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3)

(Collin Keen) #5

Lukas, thanks for your help I think that filter_limit did the trick. Great work!