Analytics

GET /analytics/(type)

Returns a list of posts, authors, sections or tags depending on the specified type. This is typically used to generate front page or article page widgets featuring your "Most Popular" content. Use :http:method:analytics-detail to retrieve drill-downs to posts for "authors" and "sections" listings.

Path arguments

type One of posts, authors, sections, tags

Optional parameters

days Number of days since today to consider for _hits value; defaults to 3. Use days=1 or days=3 to only consider traffic from last several days. Limited to the most recent 90 days.
period_start Period of data to cover in YYYY-MM-DD format, e.g. 2012-01-01 for January 1, 2012. Must be specified with period_end.
period_end Period of data to cover; must be specified with period_start, must be greater than that value, and must not be in the future.
pub_days Limit to the articles published in the last n days. Use pub_days=3 to see analytics for articles published in the last 3 days.
pub_date_start Publication date in YYYY-MM-DD format, e.g. 2012-01-01 for January 1, 2012. Must be specified with pub_date_end. This option is only available for posts.
pub_date_end Publication end date; must be specified with pub_date_start, must be greater than that value, and must not be in the future. This option is only available for posts.
sort Sort value; default is _hits (popularity).
limit Number of records to retrieve; defaults to "10".
page Page number to retrieve if multiple pages are available; defaults to 1. Retrieving a page that is unavailable returns an empty record list.
callback JSON-P callback, a JavaScript function name that will be used to wrap the JSON response.

GET /analytics/post/detail

Beta. Returns the metadata and total pageviews, in the _hits field. By default, this returns the total pageviews on the link for the last 90 days.

Path arguments

url URL of post to fetch details on. This must be in canonical form, including "http://" scheme

Optional parameters

days Number of days since today to consider for _hits value; defaults to 90. Use days=1 or days=3 to only consider traffic from last several days. Limited to the most recent 90 days.
callback JSON-P callback, a JavaScript function name that will be used to wrap the JSON response.

GET /analytics/(meta)/(value)/detail

Returns a list of posts falling under the specified author, section or tag. This is typically used in one of two scenarios. On its own, it can be used to enrich article pages with "Most Popular Posts by this Author" and section pages with "Most Popular Posts in this Section". In combination with :http:method:analytics, it can be used to implement a drill-down -- first, you retrieve a list of most popular authors with that endpoint, then you drill into the posts for one specific author with this endpoint.

Path arguments

meta one of author, section, tag

Optional parameters

days Number of days since today to consider for _hits value; defaults to 14 (2 weeks). Use days=1 or days=3 to only consider traffic from last several days. Limited to the most recent 90 days.
period_start Period of data to cover in YYYY-MM-DD format, e.g. 2012-01-01 for January 1, 2012. Must be specified with period_end.
period_end Period of data to cover; must be specified with period_start, must be greater than that value, and must not be in the future.
pub_date_start Publication date in YYYY-MM-DD format, e.g. 2012-01-01 for January 1, 2012. Must be specified with pub_date_end.
pub_date_end Publication end date; must be specified with pub_date_start, must be greater than that value, and must not be in the future.
sort Sort value; default is _hits (popularity).
limit Number of records to retrieve; defaults to 10.
page Page number to retrieve if multiple pages are available; defaults to 1. Retrieving a page that is unavailable returns an empty record list.
callback JSON-P callback, a JavaScript function name that will be used to wrap the JSON response.
Do you have an urgent support question?