What query does Live.getLastVisitsDetails Reporting api use?


#1

I want to use the query which is used to get data for Live.getLastVisitsDetails so that I can modify it further as per my requirements. From where can I get that query?


(Lukas Winkler) #2

Hi,

You can enable SQL logging as explained here:

https://matomo.org/faq/troubleshooting/


#3

Hi,

Thanks for your time.

I am using the Live.getLastVisitsDetails (Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3) module in the reporting api to fetch the data.
I just want to get the mysql db query which is used internally by the api to fetch the data.
Can I expect any help in getting that?


(Lukas Winkler) #4

Hi,
Just enable SQL logging, make the API query, an you’ll see the MySQL query in the logfile.