I use JetPack stats to follow the stats for my blog. I would like to extract the top 10 most-viewed posts for a given period (e.g. last month).
I used the WordPress stats plugin API before which worked nicely, but after upgrade to JetPack this doesn't work anymore.
Is there an API which allows me to query the number of view counts for a post?
Inside the Database
This option is recorded in the database and is used by the Dashboard widget:
It returns an array like this:
Querying WordPress.com
It is possible to call the following Jetpack function:
Which returns:
Function get_stats_csv
/plugins/jetpack/modules/stats.php
The function
get_stats_csv
callshttp://stats.wordpress.com/csv.php
. If we visit this address, we get this response: