Embed in website
To embed the chatbot into your website, follow these steps based on your web development setup:
For HTML:
Insert a script tag in your HTML with a
chatbotConfig
object containing thechatbotId
.Add the chatbot script source
https://openassistantgpt.io/chatbot.js
in your body tag.
For Next.js:
Use the "use client" directive.
Import
Script
from 'next/script' anduseEffect
from 'react'.Inside the
useEffect
hook, set thewindow.chatbotConfig
with yourchatbotId
.Use the
Script
tag to include the chatbot script withstrategy="afterInteractive"
in your main component.
These steps allow the chatbot to be seamlessly integrated and accessible on your website.
Last updated