I have a page that displays links to other pages that are tracked with Piwik. Everything is hooked up and working.
Next to each link I want to have the total number of views, from all time, displayed (via PHP).
What type of query URL should I use? I have something like this right now:
index.php?module=API&method=VisitsSummary.getVisits&idSite=x&period=year&date=last30&format=PHP&prettyDisplay=true&token_auth=x
Which returns an array like this:
a:11:{i:2000;d:0;i:2001;d:0;i:2002;d:0;i:2003;d:0;i:2004;d:0;i:2005;d:0;i:2006;d
:0;i:2007;d:0;i:2008;d:0;i:2009;d:0;i:2010;d:1499;}
I could add each years’ value together to get the total number, but isn’t there an easier way to do this?
Thanks.