Widget configuration & installation

You are currently viewing a topic category type with description subcategory display type.

Widget Settings section

Widget Admin Settings

The Admin Settings section of Settings > Widget controls the functionality of the widget behind the scenes, including if/how it suggests content and if/how it's authenticated.

If you make changes to these settings, it may take up to an hour to see them in your browser due to caching. You can bypass the caching by doing a hard refresh.

  1. Recommended Tab: If you are using the widget to automatically recommend content (using Using Widget 2.0 for Contextual Help: Pages to Recommend On), this option will determine what happens if the widget opens and there is only one recommended article or category in the list. If you check the box, when the widget opens and there's only a single recommended article or category, the widget will automatically open that article or category. If you leave the box unchecked, the Recommended tab displays the list containing the single article or category.
  2. Regex Replace URLs: If you are using the widget to automatically recommend content, it has to do a little parsing of the URLs it finds to determine what content to show. Since URLs often contain ID values that might vary from user-to-user but the same overall path, Widget 2.0 includes a built-in regex that uses an {id} variable. {id} only works with numeric and 24-digit hexadecimal IDs. For IDs that don't match either of those patterns, you would use this Regex Replace URLs field to define the regex that should be used here, and you'd use the {custom} variable in your Recommend on Pages URLs. regex101 is a handy site that allows you to try out Regex rules against example words and phrases. When testing regex for use in KnowledgeOwl, select PCRE2 (PHP >= 7.3) under FLAVOR.
  3. Suggested Content: This section will determine which portion of the URL the widget uses to try to identify recommended content. It has three options:
    • Suggest content based off of the page path (default): use this setting if the website where you're embedding the widget uses the URL or page path to differentiate pages. For example, we use this setting for the widget in this support knowledge base, since our page URLs are formatted without query strings and with no special characters.
    • Use the page query strings to suggest content: use this setting if you want to recommend based on query strings, which appear in the URL as ?variable=, such as ?s= or ?client= for example. If your website's URLs don't have query strings--or the query strings aren't meaningful for recommendation distinctions--don't use this setting.
    • Disable automatic page suggestions: use this setting if you plan to consistently override the page path or query string by using our Single Page Application methods, or if you don't want the widget to suggest content at all. This effectively turns off automatic page suggestions and the widget will only provide suggestions when the _ko19.updateRecommended method is being used.
  4. Suggested Content, exclude articles that have a zero starting weight: Widget 2.0 is set up to be a "learning" widget. As people open the widget, it will track which articles or categories people end up opening from a given page. It will save this information as the Learned Bias in Widget reporting. Once the Learned Bias of a resource gets high enough, the widget will include that article or category in the Recommended tab list automatically. While this learning process can be great, if you want tight control over the content that you're recommending, you might want to disable it. Checking this box will make the widget only use the recommendations you have explicitly assigned in the Recommend On Pages (it basically ignores anything that only has a learned bias). Leaving the box unchecked will allow the widget to continue to use the learned bias to present recommended content.
  5. OAuth Authentication: If you want or need to authenticate your widget using OAuth2, you can use this section to generate the OAuth client secret, enable OAuth authentication, or regenerate the client secret. See Widget 2.0 OAuth2 authentication for full instructions and see  Widget authentication--when and how to use it to figure out if you need authentication.
  6. JWT Authentication: If you want or need to authenticate your widget using JWT, you can use this section to grab your JWT client secret, enable JWT authentication, or regenerate the client secret. See Widget 2.0 JWT authentication for full instructions and see  Widget authentication--when and how to use it to figure out if you need authentication.
  7. If you've made any changes to this section, be sure to Save them.

Widget Customize Text section

Widget Contact Form section

Custom Widget Styles

Custom Widget Javascript

Add spam protection to Widget 2.0 Contact Tab

Open widget to a specific article or category

Use Widget 2.0 for Contextual Help: Recommend on Pages

Hide one of the Widget 2.0 tabs

Widget 2.0 installation