When I use the below API, the stats provided in the results for nb_visits is actually the unique pageview stats when I look at the data within Piwik under Visitors/overview:
For example:
I run the API & the results are
<nb_visits>338</nb_visits>
<nb_hits>439</nb_hits>
But when I check in Piwik itself the data looks like this:
Date 2013
Visits 212
Actions 1581
Pageviews 439
Unique Pageviews 338
So it looks like the API is calculating the ‘unique pageviews’ instead of the ‘visits’.
I haven’t had a chance to check whether this is only happening when segment is used in the API, will only have time to do that tomorrow.