API Tracking Guidelines

By default, the Chatbot API's automatic tracking is fairly extensive, however it is up to the botmaster to decide whether or not to track additional data.

All default tracking done by the API is described in detail in API Routes. In addition, Inbenta provides tracking codes for every content shown. You can use these codes to call the API and create logs, and track user data such as clicks and ratings. For accurate bot usage analysis, Inbenta strongly recommends that you track as many event types as possible, such as clickrate and custom events. 

You can find how to set up event trackers in the "tracking/events" section of the API routes.

Recommended tracking for extendedContentsAnswer

When Federated Bot is enabled, if the search returns a Federated Bot match (from KM or Search), no click is tracked by default. Inbenta recommends that you log these CLICK in both non-session and session logs. There are several possibilities depending on the number of results and whether or not the results are clickable by the user:

Matches Data logged
single match CLICK + Content ID of matched content
multiple, user selects one CLICK + Content ID of matched content
multiple, non-clickable CLICK + Content ID of clicked content


When a user rates a content, you should call the API with a rate event and log the RATE in the non-session log. The logged data includes the content ID, the rate code and the comment if added (optional).

Displaying ratings

To display ratings options for a given answer, check the following:

  1. Check if the answer has parameters.trackingCode.rateCode set (For more information, see "Answer attributes and parameters" in API Answers types)
    • Use rateCode to evaluate the quality of the content and track it in the logs. You can add a comment to the rating if needed.
  2. Check if the answer has the "no-ratings" flag set.
    • When the "no-ratings" flag is set, Inbenta recommends that you do not show ratings for this answer.


In addition to the default events listed above and API Routes, you can set up and track custom events as required by your specific needs.