How to track Article Analytics through API (views and readings)
If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.
- Getting Started
- Knowledge Base Settings
- Article Editor
- Swifty (In-App Widget)
- API V3
- API V2 (OLD)
- Billing / Subscription
This article is dedicated to knowledge bases that are not managed by Helpjuice itself, but rather use our APIs to retrieve content.
Helpjuice does not have dedicated API endpoints for incrementing views and readings under the "/api" section. However, if you are using our API to show content outside of Helpjuice you can user the same endpoints that we use to keep tracking analytics.
The endpoints are:
||Increment question views for the given date|
||Increment question readings for the given date
|POST /questions/QUESTION-ID/analytics/DATE/seconds_spent?t=SECONDS-PAST||Increment time spent in a question|
||Increment category views for the given date
||Integer||The ID of the question/article for which you want to track analytics|
|DATE||Date (YYYY-MM-DD)||The date on which analytics will be affected. This needs to be from yesterday to tomorrow. Helpjuice does not accept dates far in the past or the future. When an invalid date is provided, we'll use Today.|
|SECONDS-PAST||Integer||The amount of seconds you want to increase the Time Spent metric by. The limit is 120s and we recommend stop tracking this metric after the user stayed for over a few minutes in the page. Someone might have forgotten it open and left, if you keep tracking the numbers will be very high.|
|CATEGORY-ID||Integer||The ID of the category you want to track analytics for. Categories can only track views.|