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:
I run the API & the results are
But when I check in Piwik itself the data looks like this:
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.