Matomo Reporting API: Output Dates to Rows vs. Columns


(Michael) #1

I’m trying to work with Google Sheets to import JSON from the Matomo API like so:

https://example.com/analytics/piwik/index.php?date=2018-04-03,2019-01-31&expanded=1&filter_limit=-1&format=JSON&format_metrics=1&idSite=1&method=API.get&module=API&period=day&token_auth=example

When I spin up the query for more than one day, it generates thousands of columns for every metric by day. Ideally, it would have a single column for each metric and a single row for each day.

Is there a mechanism for this in the API?