Piwik API returns empty result when period is other than day



I’m trying to download customer activity data (customer name is saved in custom variable 2) using Piwik API


Code above works well, but whenever I try to change period to week, month or something different than day, result is:


Any tips?

(Matthieu Aubry) #2

Hi there,

the idSubtable will change for each week / month / year so you need to call again the parent API to get the idSubtable value for the date/idSite/period combination.

Note alternatively you can use &expanded=1 on the API call to request the whole hierarchy