Getting 'unique visits over time' from a plugin


What is the best way to query the Piwik data to retrieve the data over a time-period in incements?
For example, the daily number of visits for the last week?

As far as I can tell, the only way to query the visits data is via the VisitsSummary, which only produces summary (the total number of visits for the last week).

I can call the VisitsSummary API several times, once for each day in the last week, but is there a more elegant way for getting the data?


Do you mean something like tihs:

or for custom date ranges:,2014-07-31&format=xml

Exactly like that, thank you very much!!

So the “date” specifies the date range (“last10”, “2014-07-01,2014-07-31” etc),
and “period” represents the period (“day”, “week” etc).

That’s exactly what I needed, thank you.