Integrate nextjs chat widget into wordpress site

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!

1 Comment
  1. You would supply an embed link to users, in the form of: `<script src=”`[``](`”></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.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer