Web widget not workng/activating
# support
i
Hi, I'm having trouble getting the web assistant widget to work on my wordpress site, if you could advise I'd hugely appreciate it....I can drop the code in here if that's advisable...basically the code is installed, got the assistant id and the openai api key, haven't changed anything else from the code from the vapi site...it's in the "body" section, the widget appears on the page, but then it goes round endlessly without doing anything else...any help or advice would be appreciated! I'm working on it here: https://indierepublik.com/creatives (also tried on other sites; I set up this site without theme buidler and the minimum of plugins so they're not influencing it)
@Vapi Hey any updates on this? Thanks
v
@indierepublik Hello! I'm here to help you with the web assistant widget issue on your WordPress site. It sounds like you've already taken the right steps by inserting the code into the "body" section and ensuring you have the assistant ID and OpenAI API key in place. Since the widget appears but seems to be stuck in a loading state, this could be due to a few different reasons: 1. **JavaScript Conflicts**: There might be a conflict with other JavaScript code running on your site. 2. **API Connectivity**: The widget might be failing to establish a connection with the VAPI servers. 3. **Incorrect Configuration**: There could be an issue with how the assistant ID or OpenAI API key is configured. To assist you further, I would need to check the exact code snippet you've used and any console errors that might be appearing in your browser's developer tools. If you're comfortable sharing the code snippet here, please ensure that you mask any sensitive information like your API keys. In the meantime, here are a few steps you can take: - **Check Browser Console**: Open your website, right-click, select "Inspect" and go to the "Console" tab to look for any error messages. - **Plugin Conflict Test**: Temporarily disable other plugins to see if there's a conflict causing the issue. - **Theme Conflict Test**: Switch to a default WordPress theme (like Twenty Twenty-One) to rule out theme-related issues. - **Caching**: If you're using a caching plugin, clear your site's cache and try again. Please let me know if you find any error messages or if the issue persists after these checks. If you need further assistance, I'm here to help!
i
Here's my code to check: var vapiInstance = null; const assistant = ""; // Substitute with your assistant ID const apiKey = ""; // Substitute with your Public key from Vapi Dashboard. const buttonConfig = {}; // Modify this as required (function (d, t) { var g = document.createElement(t), s = d.getElementsByTagName(t)[0]; g.src = "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js"; g.defer = true; g.async = true; s.parentNode.insertBefore(g, s); g.onload = function () { vapiInstance = window.vapiSDK.run({ apiKey: apiKey, // mandatory assistant: assistant, // mandatory config: buttonConfig, // optional }); }; })(document, "script");
@User could you check my code and see if you find any errors?
s
@indierepublik you have to use custom code of your website builder to make the script work.
i
Hi, thanks for the headsup. I can manage to have the phone icon appear on all pages; I've given up for the moment on trying to have it just appear on certain pages, as the first problem I have to solve is why the wheel just goes around when I click it and it doesn't do anything....any ideas?
s
Hey can you be clear around what is wheel here? > wheel just goes around when I click it and it doesn't do anything
i
Yeah thanks, so when I click the phone icon on the website, there is a circle going round in the classic 'wait, we're connecting' look. It doesn't get further than that
s
hey please check your browser logs what's stopping it from further contnuing you will get to know the blocker from your browser console logs.
i
oh ok that's a good tip, thanks, will check it out, thanks for getting back to me 🙂
20 Views