https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can i find my ebeded code for my chat widget t...
# ❓・ai-evy-support
r
how can i find my ebeded code for my chat widget to upload to my google website @AI Evy
a
Thanks for tagging me @repairspecialty_64579. I'll look through relevant sources and get back to you shortly.
### Answer The embed code for the Retell chat widget is a single script tag that you add to your website's HTML [(1) ]() . Here's the complete embed code structure :
Copy code
html
<script
 id="retell-widget"
 src="<https://dashboard.retellai.com/retell-widget.js%22>
 type="module"
 data-public-key="YOUR_RETELL_PUBLIC_KEY"
 data-agent-id="YOUR_CHAT_AGENT_ID"
 data-agent-version="YOUR_AGENT_VERSION"
 data-title="YOUR_CUSTOM_TITLE"
 data-logo-url="YOUR_LOGO_URL"
 data-color="YOUR_CUSTOM_COLOR"
 data-bot-name="YOUR_BOT_NAME"
 data-popup-message="YOUR_POPUP_MESSAGE"
 data-show-ai-popup="true"
 data-show-ai-popup-time="5"
 data-auto-open="false"
 data-dynamic='{"key": "value"}'
 data-recaptcha-key="YOUR_GOOGLE_RECAPTCHA_SITE_KEY"
></script>
To get your specific embed code, you'll need to replace the placeholder values with your actual credentials : 1. YOUR_RETELL_PUBLIC_KEY - Get this from your Retell dashboard under Keys → Public Keys [(2) ]() 2. YOUR_CHAT_AGENT_ID - This is the ID of your chat agent [(1) ]() 3. YOUR_AGENT_VERSION - Your agent version number You should add this script tag within the
<head>
tag of your Google website's HTML . The widget uses the Retell public key system, allowing direct API calls from the frontend without needing a backend proxy .
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) [[2] Public Keys](https://docs.retellai.com/accounts/public-keys) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @repairspecialty_64579. I'll get back to you soon.
r
can you provide the entire structue with tag @AI Evy
a
### Answer Here's the complete HTML structure with the
<head>
tag containing the Retell chat widget embed code [(1) ]() :
Copy code
html
<head>
  <script
   id="retell-widget"
   src="<https://dashboard.retellai.com/retell-widget.js%22>
   type="module"
   data-public-key="YOUR_RETELL_PUBLIC_KEY"
   data-agent-id="YOUR_CHAT_AGENT_ID"
   data-agent-version="YOUR_AGENT_VERSION"
   data-title="YOUR_CUSTOM_TITLE"
   data-logo-url="YOUR_LOGO_URL"
   data-color="YOUR_CUSTOM_COLOR"
   data-bot-name="YOUR_BOT_NAME"
   data-popup-message="YOUR_POPUP_MESSAGE"
   data-show-ai-popup="true"
   data-show-ai-popup-time="5"
   data-auto-open="false"
   data-dynamic='{"key": "value"}'
   data-recaptcha-key="YOUR_GOOGLE_RECAPTCHA_SITE_KEY"
  ></script>
</head>
The documentation specifies that you should add this script tag within the
<head>
tag . Make sure to replace the placeholder values with your actual Retell credentials from your dashboard.
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
i have embedded the script with the correct values. i can see my widget but it is not responding. What should i do ? @AI Evy
a
Thanks for the follow-up, @repairspecialty_64579. I'll get back to you soon.
### Answer Since your widget appears but isn't responding, here are the key troubleshooting steps: 1. Check your agent version configuration [(1) ](

▾

) If you haven't published any versions, make sure the version is set to "0" or remove the
data-agent-version
line entirely . If you leave the version line but have published versions, it will use the most recent version . 2. Verify your public key domain settings You need to create a public key and set up the allowed domain for your website (including staging environments if applicable) . Make sure your current domain is listed in the allowed domains for your public key . 3. Ensure you're using a chat agent [(2) ]() The chat widget requires a chat agent specifically created for text-based conversations . Voice agents won't work with the chat widget . 4. Check browser console for errors Open your browser's developer tools and check the console for any JavaScript errors that might indicate what's preventing the widget from functioning properly. 5. Verify all required credentials are correct Double-check that you've replaced all placeholder values with your actual: - Retell Public Key - Chat Agent ID - Agent Version (if applicable) The widget uses the Retell public key system for direct API calls from the frontend , so any misconfiguration in these credentials will prevent it from working.
​ To learn more, see the sources I considered: [[1] Speed to Lead: Driving Results with Outbound Facebook Campaigns](

https://www.youtube.com/watch?v=9fgelfy6kQA▾

) [[2] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
i tried the key troubleshooting step and my widget is still not working
a
Thanks for the follow-up, @repairspecialty_64579. I'll get back to you soon.
r
@AI Evy
a
### Answer [(1) ]() Since you've already tried the key troubleshooting steps and your widget is still not working, here are additional steps to diagnose the issue: 1. Verify the exact script format Make sure your script tag matches this exact format:
Copy code
html
<script
 id="retell-widget"
 src="<https://dashboard.retellai.com/retell-widget.js%22>
 type="module"
 data-public-key="YOUR_RETELL_PUBLIC_KEY"
 data-agent-id="YOUR_CHAT_AGENT_ID"
 data-agent-version="YOUR_AGENT_VERSION"
></script>
*2. Check reCAPTCHA configuration (if enabled) * If you're using reCAPTCHA protection, ensure you have: - Added the Google reCAPTCHA v3 script to your HTML
<head>
tag - Enabled reCAPTCHA protection for your public key in the Retell Public Keys settings - Note that only reCAPTCHA v3 is supported 3. Test with minimal configuration Try using only the required attributes first: -
data-public-key
- Your Retell public key -
data-agent-id
- Your chat agent ID Remove all optional attributes temporarily to isolate the issue. 4. Verify agent configuration Ensure your agent is properly configured as a chat agent, not a voice agent, since the chat widget is specifically for text-based interactions . If the widget still doesn't work after these checks, I'd recommend visiting [Contact Sales]() or [) for additional support. Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Retell Website Widget](https://docs.retellai.com/deploy/chat-widget) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.