Add GaiaHub on your website

After creating your Chatbot, you might want to share it on your website, and here is how you do that:

In the app editor area, you'll find a sharing icon like in the picture:

Share your app

In there you'll find several options to integrate your app with other things, like a website for example:

Share your app via javascript

Then, click on the "copy" button:

And finaly, inject that block of code in your website. Here, as an example, we'll add it to our "Hello world!" page:

```html
<!DOCTYPE html>
<html>
<head>
    <title>Hello World Website</title>
</head>


<script type="module">
    import Chatbot from "https://gaiahub.github.io/web-packages/gaia-embed/dist/web.js"
    Chatbot.init({
        chatflowid: "a9ad179d-6ebd-4431-9042-ca05c78edc09",
        apiHost: "https://api.gaiahub.ai",
    })
</script>


<body>
    <h1>Hello World</h1>
</body>
</html>
```

And you will see a little floating chat button on the bottom of your website:

But you also have other options:

  • ReactJS

  • Python

  • cURL

You can pick up the option that best works for your use case.

Let us know if you need any help. Our team will be happy to help!

Happy hacking!

Last updated