Top Articles

Retrieve event counts for a specified host and date range. Counts are assigned per attributed path.

Top Articles

GET https://api.chartbeat.com/milkyway_dashboard/v1/top_articles_by_event_type

Fetch the top articles that drove a given event

Query Parameters

NameTypeDescription

host*

String

The site on which you are querying

end

String

Include timestamp. The format of the timestamp should be ISO8601 compliant (e.g. 2013-05-11T20:00:00Z) or if you want to query in a different time zone (e.g. 2013-05-11T20:00:00+07:00).

start

String

Include timestamp. The format of the timestamp should be ISO8601 compliant (e.g. 2013-05-11T20:00:00Z) or if you want to query in a different time zone (e.g. 2013-05-11T20:00:00+07:00).

sort_event_type*

String

Event type used to sort articles. Use a combination of the event category name (paywall, registration, or newsletter_signup) and shown, start, complete, or cancel in the format categoryname_action

limit*

Number

The maximum number of distinct articles to return.

apikey (see note)

String

NOTE: Your API key should no longer be set as a query param; instead. pass it in the HTTP header

            {
              "status": "success",
              "data": {
                "top_pages": [
                  {
                    "sort_value": 12,
                    "event_types": {
                      "paywall_complete": 6,
                      "paywall_show ": 27,
                    },
                    "attribution_path": "site.com/myarticle/2"
                  },
                  {
                    "sort_value": 11,
                    "event_types": {
                      "paywall_complete": 1,
                      "paywall_shown": 26
                    },
                    "attribution_path": "site.com/myarticle/1"
                  },
                  {
                    "sort_value": 6,
                    "event_types": {
                      "paywall_complete": 5,
                      "paywall_shown": 33
                    },
                    "attribution_path": "site.com/myarticle/3"
                  }
                ]
              }
            }

Last updated