Getting Started with our Conversion API
Get familiar with our Conversion API to fetch the top articles that drove a given event.
This section contains information on how to make requests to Chartbeat’s Top Converting Articles API endpoint, allowing you to fetch the top articles that drove a given event (e.g. subscriptions) for a specific time range. Counts are assigned per attributed path.
For example, you can ask, "What were my top 10 articles over the last 3 hours that drove subscriptions?"
The Top Converting Articles API only provides Last Touch attribution for event categories that include a
Shown
event. For categories that do not include a Shown
event, all conversions have a null attribution path; this means that you will see a count of total conversions for the selected event category, where conversions includes the total number of Complete
events for the event category specified.Parameter name | Syntax | Description |
---|---|---|
Host name | host= | The site you are querying (host is usually your website's root domain, e.g. host=site.com ). |
API Key | apikey= | Your Chartbeat API Key. This can be found on the API Keys page in your Settings. Set to "all" access |
Sort by Event Type | sort_event_type= | Event type used to sort articles. Use a combination of the event category ( paywall , registration , or newsletter_signup ) and shown, start , complete , or cancel in the format categoryname_action (for example, paywall_complete or newsletter_signup_complete Note that these are case sensitive. |
Row limit | limit= | The maximum number of distinct articles to return. |
Parameter name | Syntax | Description |
---|---|---|
Start Date | start= | If using a start/end date, including a timestamp. The format of the timestamp should be ISO 8601 compliant (e.g. 2023-05-11T20:00:00Z , i.e. a UTC timestamp) or if you want to query in a different time zone (e.g. 2013-05-11T20:00:00+07:00 ). |
End Date | end= | The API group event counts for articles by the hour. Set this argument to be the ending hour. This is an exclusive bound so the API will return counts at times less than the end parameter.
If using a start/end date, including a timestamp. The format of the timestamp should be ISO 8601 compliant (e.g. 2023-05-11T20:00:00Z , i.e. a UTC timestamp) or if you want to query in a different time zone (e.g. 2013-05-11T20:00:00+07:00 ). |
To query for all events received on May 11, 2023 from 20:00:00 to 22:59:59 (i.e. not including events received at 23:00:00 or later), you would set
start=2023-05-11T20:00:00Z&end=2023-05-11T23:00:00Z
. To query data for a single day, you would set
start=2023-05-11T00:00:00Z&end=2023-05-11T23:59:59Z
.Last modified 15h ago