Inserting Chat Widget into the Admin Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zon
    Junior Member
    • May 2024
    • 3

    Inserting Chat Widget into the Admin Page

    Hello everyone, Is there any method to insert a widget from botchat into the admin page of espocrm?

    I have tried inserting the script successfully, but the chat widget does not appear.

    Below is my code:

    <script>
    window.embeddedChatbotConfig = {
    chatbotId: "aKQwkzeBbr7bIX6FHmuEL",
    domain: "www.chatbase.co"
    }
    </script>
    <script
    src="https://www.chatbase.co/embed.min.js"
    chatbotId="aKQwkzeBbr7bIX6FHmuEL"
    domain="www.chatbase.co"
    defer>
    </script>​
  • Firyo
    Senior Member
    • Jun 2022
    • 134

    #2
    Hi there,

    Is there any error inside your browser's console ?

    Comment

    • abidoss
      Senior Member
      • Mar 2023
      • 228

      #3
      Or did you add the script?

      Comment

      • zon
        Junior Member
        • May 2024
        • 3

        #4
        I have inserted a snippet of code client.json into /custom/Espo/Custom/Resources/metadata/

        It worked. However, if I replace the js file from an external path, the script will be blocked by the browser.

        client.json

        {
        "cssList": [
        "__APPEND__",
        "client/custom/modules/test/css/file.css"
        ],
        "scriptList": [
        "__APPEND__",

        "client/custom/modules/test/js/chatbot-config.js",
        "client/custom/modules/test/js/embed.min.js"
        ],
        "developerModeScriptList": [
        "__APPEND__",

        "client/custom/modules/test/js/chatbot-config.js",
        "client/custom/modules/test/js/embed.min.js"
        ]
        }

        Comment

        • zon
          Junior Member
          • May 2024
          • 3

          #5
          Is there a safe way to add this chatbot widget code to EspoCRM? Thank you:

          <script>
          window.embeddedChatbotConfig = {
          chatbotId: "aKQwkzeBbr7bIX6FHmuEL",
          domain: "www.chatbase.co"
          }
          </script>
          <script
          src="https://www.chatbase.co/embed.min.js"
          chatbotId="aKQwkzeBbr7bIX6FHmuEL"
          domain="www.chatbase.co"
          defer>
          </script>

          Comment

          • abidoss
            Senior Member
            • Mar 2023
            • 228

            #6
            If I remember correctly, you have to add it in main.html

            Comment

            Working...