--- title: "Allow Users to Hide or Dismiss the In-App Hub" slug: "allow-users-to-hide-or-dismiss-the-in-app-hub" updated: 2026-11-23T12:30:19Z published: 2026-11-23T12:30:19Z canonical: "support.gainsight.com/allow-users-to-hide-or-dismiss-the-in-app-hub" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Allow Users to Hide or Dismiss the In-App Hub This article walks admins through how to give their users a way to hide or dismiss the In-App Hub (formerly Knowledge Center Bot) from within the hub itself, using a custom JavaScript function. ## Overview The In-App Hub does not currently support a native option for users to dismiss the floating launcher. Gainsight PX allows you to work around this by adding a custom JavaScript function to a widget inside the hub. When a user clicks this widget, the hub closes and the launcher is hidden for the remainder of the session. **Business Use Case:** Consider that your UX team wants end users to have control over the floating Help launcher, or that users have reported finding it intrusive. Rather than building a custom dismiss button directly into your product UI, you can validate whether users want this control by adding a dismiss option inside the hub itself. > [!WARNING] > Important > > - This solution hides the In-App Hub for the current session only. The In-App Hub reappears by default when the user starts a new session. > - This requires access to modify your application code (PX SDK implementation). > - JavaScript execution inside the In-App Hub is restricted for security reasons. The `kcAllowedFuncNames` SDK configuration described in this article is required to allow a specific function to run. ## Configure the Dismiss Option To configure a dismiss option, perform the following steps in the prescribed order: 1. [Configure In-App Hub Launch Settings](/v1/docs/allow-users-to-hide-or-dismiss-the-in-app-hub#configure-inapp-hub-launch-settings) 2. [Add the Function Name to Your PX SDK](/v1/docs/allow-users-to-hide-or-dismiss-the-in-app-hub#add-the-function-name-to-your-px-sdk) 3. [Add the JavaScript Function to Your Application](/v1/docs/allow-users-to-hide-or-dismiss-the-in-app-hub#add-the-javascript-function-to-your-application) 4. [Add the JavaScript Function to the Content Library](/v1/docs/allow-users-to-hide-or-dismiss-the-in-app-hub#add-the-javascript-function-to-the-content-library) 5. [Add the Dismiss Option to the In-App Hub](/v1/docs/allow-users-to-hide-or-dismiss-the-in-app-hub#add-the-dismiss-option-to-the-inapp-hub) ### Configure In-App Hub Launch Settings Before you can control the In-App Hub using API commands, you must enable this behavior in SDK Settings. 1. Navigate to **Administration > SDK Settings**. 2. In the **In-App Hub Launch Options** section, select **The In-App Hub is controlled using API commands and to qualified users**. 3. Click **Save**. ![Gainsight PX SDK Settings showing In-App Hub launch options to control hub visibility using API commands for qualified users](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/launch_settings.jpg?sv=2026-02-06&spr=https&st=2026-11-24T19%3A02%3A16Z&se=2026-11-24T20%3A02%3A16Z&sr=b&sp=r&sig=JjKtMb37VrBnoA8dVSRSU1yr5fya5ULhj9PxoWKtq6Y%3D) ### Add the Function Name to Your PX SDK Admins need to add the JavaScript function to the product tag to ensure security. Add the following configuration to your PX SDK (product tag), where the function to add is `disableKCB`: ```plaintext var config = {  kcAllowedFuncNames: ["disableKCB"] }; ``` ### Add the JavaScript Function to Your Application Add the following function to your application code, after the PX tag: ```plaintext function disableKCB() {  aptrinsic('kcb', 'close');  setTimeout(function() {    aptrinsic('kcb', 'hide');  }, 500); } ``` > [!NOTE] > Note > > The `close` command closes the open hub window, and the `hide` command removes the floating launcher icon. Both are required. Calling `hide` alone does not close an already-open hub window, and calling `close` alone does not remove the launcher icon. The delay between the two calls allows the close action to complete before the hide action runs. For more information on these commands, refer to the [*Work with Knowledge Center Bot API*](/v1/docs/work-with-in-app-hub-api) article. ### Add the JavaScript Function to the Content Library The function must be added to the Content Library before it can be used as widget content. 1. Navigate to **In-App Hub > Content Library**. 2. Click **Add Content** and select **JavaScript Function**. 3. Enter the **JavaScript Function Name**: disableKCB. 4. Click **Add**. ![Gainsight PX Content Library Add Function dialog showing fields to configure a JavaScript function for dismissing the In-App Hub](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/content_library.jpg?sv=2026-02-06&spr=https&st=2026-11-24T19%3A02%3A16Z&se=2026-11-24T20%3A02%3A16Z&sr=b&sp=r&sig=qLI9PTzlJb%2BHDF8I%2BvIPPTE2xFBr2wSSee%2BldbeVN%2FE%3D) > [!WARNING] > Important > > Enter the function name only, and do not include parentheses. > > - Correct: disableKCB > - Incorrect: disableKCB() > > For more information on adding content to the Content Library, refer to the [*Manage In-App Hub Content using Content Library*](/v1/docs/manage-in-app-hub-formerly-kc-bot-content-using-content-library) article. ### Add the Dismiss Option to the In-App Hub With the function available in the Content Library, you can now add it to the hub as a widget end users can click. 1. From the main menu, click **In-App Hub**. 2. Click **Add Widget**. 3. Select **Content Group**. 4. Select a layout, such as **Card Layout**. 5. Enter a title, such as *Hide Help Center*. 6. Add the JavaScript Function created previously as the content for this widget. 7. Click **Save**. ![Gainsight PX In-App Hub Content Group showing a custom function that lets end users dismiss or hide the In-App Hub](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/dismiss_option_.jpg?sv=2026-02-06&spr=https&st=2026-11-24T19%3A02%3A16Z&se=2026-11-24T20%3A02%3A16Z&sr=b&sp=r&sig=KH4TeC8CxZOjNhCT3P%2BHOL%2FWCzR1OQpfPYU%2BxAcIkQE%3D)