How to have the chatbot open or closed depending on pages?

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 loaded and hidden)

NB: We recommend that you use these functions via window[“ideta_bot_action”](action) (ex: window[“ideta_bot_action”](“load”) ) to avoid problems with the code editors.

If you want to load the chat only later, make sure to click that option in Publish > See more > User behaviour management > Activate navigation options and make sure Load bot on page opening is unchecked.

Here is what hide the bot on a specific page. I added the code with HTML widget on Elementor page.

<script>
  document.addEventListener("DOMContentLoaded", function() {
    // Function to remove the bot
    function removeBot() {
      var botElement = document.getElementById("ideta_i");
      if (botElement) {
        botElement.remove(); // Completely removes the bot from DOM
        console.log("Ideta bot removed.");
      }
    }

    // Observe changes in the DOM
    var observer = new MutationObserver(function(mutationsList, observer) {
      for (var mutation of mutationsList) {
        if (mutation.type === "childList") {
          removeBot(); // Try removing the bot whenever DOM changes
        }
      }
    });

    // Start observing the body for changes
    observer.observe(document.body, { childList: true, subtree: true });

    // Initial attempt to remove the bot (in case it's already loaded)
    removeBot();
  });
</script>
<script>
  document.addEventListener("DOMContentLoaded", function() {
    function removeBotElements() {
      // List of element IDs to remove or hide.
      var elementsToHide = ["ideta_i", "ideta_c"];
      elementsToHide.forEach(function(id) {
        var el = document.getElementById(id);
        if (el) {
          // Option 1: Hide the element
          el.style.display = "none";
          // Option 2: Completely remove the element (uncomment the next line if desired)
          // el.remove();
          console.log("Element with ID " + id + " removed/hidden.");
        }
      });
    }
  
    // Use MutationObserver to catch any dynamically added elements.
    var observer = new MutationObserver(function(mutations) {
      mutations.forEach(function(mutation) {
        if (mutation.type === "childList") {
          removeBotElements();
        }
      });
    });
  
    observer.observe(document.body, { childList: true, subtree: true });
  
    // Initial removal attempt in case the elements are already loaded.
    removeBotElements();
  });
</script>

Hi !

Have you tried the following ?

<script>
  window.ideta_bot_action('hide');
</script>

Below a test on the Chrome developer console.

Before :

After :