Skip to main content

FAQ

Why do I need to whitelist my domains?

The kapa Website Widget implements invisible reCAPTCHA to protect against bad actors connecting to your kapa instance programmatically. This determines whether a person interacting with your widget is a real human or a bot. Only real humans are allowed to submit questions through the widget. The domain on which you are installing the Website Widget has to be whitelisted by the kapa team. Simply share your target domain and any staging domains with the kapa team and they will whitelist them for you immediately. If reCAPTCHA is not whitelisted you will see this error message in your widget:

“ReCAPTCHA token not yet configured. Please reach out to the kapa team at founders@kapa.ai to complete the setup.”

How do I enable search mode?

By default, search mode is not enabled. To enable search mode you just need to set the data-search-mode-enabled parameter to "true" and it will appear on the widget. You can try the "Ask AI" kapa widget on this page on the bottom right corner to see what this looks like.

Search Integration

If you want to have the kapa search override your existing search you just need to set the data-modal-override-open-class parameter the class name of your existing search button (e.g., "my-search-bar-class") to override the modal open behavior. Alternatively, you can also set the data-modal-override-open-id parameter and assign the id of your existing HTML element. Assigning an id is more efficient than assigning a class name, as the latter requires iterating through the entire DOM tree.

There are more search configuration parameters listed above to e.g., specifcy sources returned and preferred order.

Can I listen to events?

Yes, the kapa widget exposes a set of events that can be listened to via the kapa Web API, allowing any type of action to be triggered based on those events.

This is useful if you want to track kapa usage in your analytics stack, such as tracking submitted questions in tools like Mixpanel, Amplitude, Segment, etc.

For more information on how to implement event listeners, refer to the kapa Events API reference.

How can I attach the widget to a custom button?

Instead of opening and closing the kapa widget with the default button you can attach it to any element in your UI.

To do this first hide the default button using data-button-hide and then make use of the following config options to trigger the widget from one or multiple different components.

  • data-modal-override-open-class
  • data-modal-override-open-id
  • data-modal-override-open-class-search
  • data-modal-override-open-id-search
  • data-modal-override-open-class-ask-ai
  • data-modal-override-open-id-ask-ai:

I have some global CSS defined that is overriding the widget's styles. How can I fix this?

If you have global CSS selectors with higher specificity than the Kapa widget styles, you can prevent those styles from affecting elements within the Kapa widget by using the :not() pseudo-class in combination with the following IDs:

  • kapa-widget-portal: ID that targets the outermost DOM element that contains the widget’s modal.
  • kapa-widget-container: ID that targets the outermost DOM element that contains the widget’s button.

For example, if you have a global CSS selector as shown below:

h3 {
color: pink;
}

To prevent this style from applying to the <h3> elements within the widget, you can modify the selector using the :not() pseudo-class to exclude all descendants of the element with the ID kapa-widget-portal in the DOM like this:

h3:not(#kapa-widget-portal *) {
color: pink;
}

What are the default question rate limits?

  • Per website
    • Second: 10
    • Minute: 100
    • Hour: 500
    • Day: 2000

You can configure all of these limits. Simply reach out to the kapa team and we will help you set up the limits that fit your needs.

What happens if I go over the set limit?

  • Website rate limit
    • This rate limit is shared by all users to the website. When the website goes over the limit all users of the widget will see an error message until the usage is under the limit again:
    • i.e. "System capacity reached, please wait a few minutes and try again.”

How do I fix Content Security Policy (CSP) errors?

If your website has a Content Security Policy enabled, you'll need to whitelist the following domains in your CSP configuration to allow the widget to function properly:

  • https://kapa-widget-proxy-la7dkmplpq-uc.a.run.app - For widget functionality
  • https://www.google.com/recaptcha - For reCAPTCHA functionality
  • http://metrics.kapa.ai - For optional analytics and metrics collection