The widget collects feedback in three ways:
  • 👍 / 👎 on every answer. Always on.
  • The exit survey asks “Did you find what you were looking for?” when a reader leaves without rating anything. On by default.
  • The satisfaction survey asks for a 1–5 rating after a few answers. Off by default.
There is no sampling. Every reader who meets a survey’s condition is asked, once per page load.

Answer ratings

Each finished answer has a copy button, a thumbs up and a thumbs down. Pressing a thumb records the vote. Pressing it again takes the vote back, and pressing the other thumb replaces it. Kelu keeps one vote per answer. Votes are stored with the conversation and appear in the knowledge base’s analytics. A thumbs down also marks the question as a knowledge gap. Readers never see a vote count. Each vote fires onAskAIFeedbackSubmit, with reaction set to up, down or withdrawn.

Exit survey

When the reader closes the panel on a conversation that has an answer and no rating, the survey appears the next time they open the panel on that page. It is asked at most once per page load, and never after the reader has rated an answer. The reader picks Yes or No, or Not now to dismiss it. To turn it off:
<script async src="https://widget.kelu.dev/kelu-widget.js"
  data-knowledge-base-id="YOUR_KNOWLEDGE_BASE_ID"
  data-client-key="kl_pk_..."
  data-exit-feedback-enabled="false"></script>

Satisfaction survey

When turned on, the survey appears once per page load, after the reader’s third answer on that page (data-user-satisfaction-after-answers changes the number). It asks for a rating from 1 to 5 and an optional comment. Send feedback needs a rating; Not now dismisses it.
<script async src="https://widget.kelu.dev/kelu-widget.js"
  data-knowledge-base-id="YOUR_KNOWLEDGE_BASE_ID"
  data-client-key="kl_pk_..."
  data-user-satisfaction-feedback-enabled="true"
  data-user-satisfaction-after-answers="2"></script>

Where survey answers go

Kelu does not store survey answers. They reach your page as events only, so send them to your own analytics from a handler. Answer ratings are different: Kelu stores those and shows them in analytics.
window.Kelu("onExitFeedbackSubmit", ({ helpful, threadId }) => {
  analytics.track("docs_ai_exit_survey", { helpful, threadId });
});

window.Kelu("onUserSatisfactionSubmit", ({ rating, comment, threadId }) => {
  analytics.track("docs_ai_satisfaction", { rating, comment, threadId });
});
See Events for every payload.

Reference

AttributeDefaultWhat it does
data-exit-feedback-enabledtruefalse never shows the exit survey
data-user-satisfaction-feedback-enabledfalsetrue offers the 1–5 survey
data-user-satisfaction-after-answers3Answers on the page before the satisfaction survey appears
You can also switch both surveys on or off in the dashboard, in a widget integration’s Behaviour tab. The surveys use the theme colours and follow data-language.