What query does Live.getLastVisitsDetails Reporting api use?

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?


You can enable SQL logging as explained here:



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?

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

1 Like