# Hiding the AI Sales Agent on specific pages

> Configure the URLs (such as your cart or checkout) where the AI Sales Agent should not appear.

URL: https://help.yasan.ai/en/hiding-chatbot-on-specific-urls/
Updated: 2026-11-20

The chat widget is a great assistant, but on some pages it can get in the way — typically on the cart or checkout, where it can cover the "Order" button or payment form on mobile. You can now configure which URLs should never show the AI Sales Agent.

This feature is entirely opt-in. If you leave the list empty, AI Sales Agent will keep showing up on every page of your website, just like before.

## How to set up hiding the AI Sales Agent

**1. Open bot settings**

In the left menu, click **AI Sales Agents** and select your bot.

**2. Go to the Placement section**

In the bot settings, open the **Placement** section.

**3. Scroll to the Visibility block**

Scroll down the page to the **Visibility** block and the **Hide chatbot on these URLs** field.

**4. Add a URL**

Click **Add URL** and enter the path where the chatbot should be hidden (for example `/cart` or `/checkout`).

**5. Add more URLs as needed**

Use the **Add URL** button to add as many additional pages as you need.

**6. Save your changes**

Don't forget to click **Save changes** in the bar at the bottom of the page.

**7. Verify on your website**

Open the page on your live store and confirm that AI Sales Agent no longer appears there.

![AI Sales Agent visibility settings](https://help.yasan.ai/help/hiding-chatbot-on-specific-urls/chatbot-visibility-settings.en.png)

*The Visibility block in the Placement section with a configured list of hidden URLs*

## How URL matching works

The URL you enter behaves like a **prefix** — it hides that page and all of its subpages, but not pages that merely share the same starting text.

- `/checkout` hides `/checkout`, `/checkout/`, and `/checkout/payment`
- `/checkout` does **not** hide `/checkout-faq` — that's a sibling page, not a subpage

### Automatic normalization

When you save, the system automatically cleans up the entry, so small formatting differences don't matter:

- trims extra whitespace at the start and end,
- adds a leading slash (`cart` is saved as `/cart`),
- removes a trailing slash (`/checkout/` is saved as `/checkout`),
- removes the domain part when you paste a full address (`https://www.your-shop.com/checkout` is saved as `/checkout`),
- removes query strings and fragments (`/checkout?step=1#top` is saved as `/checkout`).

### Accents and URL encoding

Hiding works correctly for paths containing accented or non-ASCII characters too. If you enter `/košík`, AI Sales Agent will also be hidden on the percent-encoded version of that address that browsers typically report (e.g. `/ko%C5%A1%C3%ADk`).

### Homepage

If you enter just `/` as the URL, only the homepage is hidden — not the entire website.

| Entered URL | Hides | Does not hide |
|---|---|---|
| `/cart` | `/cart`, `/cart/shipping` | `/`, `/products` |
| `/checkout` | `/checkout`, `/checkout/payment` | `/checkout-faq` |
| `/` | only the homepage | `/anything-else` |

Typical candidates for most online stores are pages like `/cart`, `/checkout`, or `/order`.

> **Tip**
>
> Start with your cart and checkout — those are the pages where the widget most often gets in the way.

## Dashboard preview and demo page

> **Info**
>
> The widget preview in the dashboard and the public `/demo` page always show AI Sales Agent, regardless of your configured list of hidden URLs. Don't expect the preview to reflect the hiding behavior — verify it directly on your live website instead.

## Hiding the widget over popups and overlays (JavaScript API)

The URL list only works for pages that have their own address. Some elements don't — a typical example is a cart popup or another overlay that opens on top of the current page without changing the URL. For those cases the widget exposes a small JavaScript API that your website's own scripts can call:

```html
<script>
  // Hide the widget while your overlay is open…
  window.Yasan?.Chatbot.hide();

  // …and bring it back when the overlay closes.
  window.Yasan?.Chatbot.show();
</script>
```

- `hide()` hides everything the widget shows — the launcher bubble and the chat panel, even if it is currently open.
- `show()` brings the widget back exactly as it was; an open conversation stays open.
- `Yasan.Chatbot.isVisible` tells you whether the widget is currently shown.
- Existing installs that call `window.Whisper` keep working unchanged.

The calls are safe to make at any time, even before the widget has finished loading. Hiding is not remembered across page loads — every page starts with the widget visible, so call `hide()` again whenever your overlay opens.

> **Tip**
>
> Wire the calls to whatever event your store platform fires when the popup opens and closes. If no event is available, a `MutationObserver` watching for the popup element is a reliable fallback.

> **Info**
>
> On Shoptet you don't need to do any of this for cookie bars. The widget already hides itself while the shop's cookie consent bar or its settings dialog is on screen, and comes back as soon as the visitor answers — that covers Shoptet's own bar, the "Cookies lišta+" add-on, and the older bar alike. Use the calls above only for a third-party consent tool.

## Difference from enabling/disabling the AI Sales Agent

This feature is for **selectively** hiding the widget on specific pages — AI Sales Agent stays active and fully functional everywhere else on your site. If you want to turn AI Sales Agent off completely and everywhere, use the global toggle described in [Enabling and Disabling the AI Sales Agent](https://help.yasan.ai/en/enabling-and-disabling-the-ai-sales-agent/).

## Related Articles
- [Customizing AI Sales Agent Appearance](https://help.yasan.ai/en/customizing-widget-appearance/)
- [Enabling and Disabling the AI Sales Agent](https://help.yasan.ai/en/enabling-and-disabling-the-ai-sales-agent/)
- [Installing the AI Sales Agent](https://help.yasan.ai/en/installing-the-chat-widget/)