# How can I have a different bot on different pages?

**URL:** https://forum.ideta.io/t/how-can-i-have-a-different-bot-on-different-pages/288
**Category:** I don't know where to post
**Created:** [June 28, 2023, 8:07am UTC](https://forum.ideta.io/t/how-can-i-have-a-different-bot-on-different-pages/288 "2023-06-28T08:07:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Glen](https://avatars.discourse-cdn.com/v4/letter/g/8c91f0/32.png) [@Glen](https://forum.ideta.io/u/Glen)
#### Post date: [June 28, 2023, 8:07am UTC](https://forum.ideta.io/t/how-can-i-have-a-different-bot-on-different-pages/288/1 "2023-06-28T08:07:41Z")

</div>

Hi !

If you want to hide the bot, that thread is what you need :

> [@How to have the chatbot open or closed depending on pages?](https://forum.ideta.io/t/how-to-have-the-chatbot-open-or-closed-depending-on-pages/256):
>
> There are functions that allow you to manage the Livechat bubble display : ● ideta\_bot\_action(“load”) : load the bot ideta\_bot\_action(“load”, load\_open?:boolean) is a function that accepts a second optional parameter, which is a boolean type (true/false) that allows you to load an already opened bot or not. ● ideta\_bot\_action(“remove”) : remove the bot ● ideta\_bot\_action(“hide”) : hide the bot (only if it is already loaded) ● ideta\_bot\_action(“show”) : show the bot (only if it is already lo…

The simplest way to have different bots on different pages is to have divided your bot into two sub bots and use one or the other depending on the page.

To do that, your first bubble needs to be an Operation bubble :

 ![Capture d’écran 2023-06-28 à 09.45.25](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/38311c8f4eb2e2fea70d0e0a2cce805c7859af24.png)

Then, if it does not exist, create the ideta\_origin variable with the href property :

 ![Capture d’écran 2023-06-28 à 09.47.06](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/d20dcd6569bd6b89d73885dc1f69d4936a6e7477.jpeg)  
 ![Capture d’écran 2023-06-28 à 09.47.43](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/bf17925d92ca1d89d1e9c078cd64f865fcae5e0e.jpeg)

Then create your comparison and compare ideta\_origin.href to a URL :

 ![Capture d’écran 2023-06-28 à 10.03.31](https://europe1.discourse-cdn.com/flex017/uploads/ideta/original/1X/bc1d7d3f5cc5fee1f8b8365f4e0a5f5576b7770b.jpeg)

If it matches the URL you entered, it will redirect to a part of a bot and if not it will be another part.

Instead of ==, you can use a regex as comparison to match a part of your website and not a specific URL.

You can also create ideta\_origin.pathname that can be easier to handle afterwards
