Hi, I’m trying to implement a chatbot using vercel’s AI SDK using nextjs.
Currently, the chatbot is just a small window on the bottom right of my screen. However, I would like the chatbot to be a widget that can be easily added in other third party websites that I host (wordpress). I know that services such as freshdesk / zendesk provides a script link that can be easily added to the HTML head of a site, and their chat widget will work.
I have seen people talking of using iframes, but when i tried, the javascript did not run. I’m not too sure of how to generate a script link that will work, I will appreciate if anyone has any ideas!
You would supply an embed link to users, in the form of: `<script src=”`[`https://yourchatbot.com/embed.js`](https://yourchatbot.com/embed.js)`”></script>` (look at how everyone else does it – you can also simply load their JS in a text editor to see how it work)
Your script would inject the relevant HTML into the users page.