immaculate_courgette_69550
08/05/2025, 5:20 PMAI Evy
08/05/2025, 5:20 PMAI Evy
08/05/2025, 5:21 PMhead tag :
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_RETELL_CHAT_AGENT_ID"
data-agent-version="YOUR_RETELL_CHAT_AGENT_VERSION"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
></script>
Replace the placeholders with:
- YOUR_RETELL_PUBLIC_KEY with your actual Retell public key
- YOUR_RETELL_CHAT_AGENT_ID with your actual Retell agent ID
- YOUR_RETELL_CHAT_AGENT_VERSION with your agent version (optional - if unset, latest version will be used)
- YOUR_CUSTOM_TITLE with your preferred chat window title (optional)
- YOUR_LOGO_URL with the URL of your logo image (optional)
- YOUR_CUSTOM_COLOR with a hex color code for the widget theme (optional)
The widget uses the Retell public key system, allowing direct API calls from the frontend with no backend proxy required [(1) ]() [(2) ]() . After deployment, test by loading your website and clicking the floating button (bottom right, robot icon) [(1) ]() .AI Evy
08/05/2025, 5:21 PMAI Evy
08/05/2025, 5:21 PMimmaculate_courgette_69550
08/05/2025, 5:24 PMimmaculate_courgette_69550
08/05/2025, 5:24 PMAI Evy
08/05/2025, 5:24 PMAI Evy
08/05/2025, 5:25 PMexample.com, app.example.com)
- For testing locally, add localhost to your allowed domains list
Unlike API keys, public keys are specifically designed for frontend use and are safe to include in client-side code for the chat widget .AI Evy
08/05/2025, 5:25 PMAI Evy
08/05/2025, 5:25 PMimmaculate_courgette_69550
08/05/2025, 5:32 PMAI Evy
08/05/2025, 5:32 PMAI Evy
08/05/2025, 5:33 PMdata-agent-version="v3", but according to the documentation, the agent version should be a number, not a string with "v" prefix [(1) ]() . The documentation shows examples like data-agent-version="0" . Try changing it to just the numeric version:
html
data-agent-version="3"
2. Script Placement
Make sure the script tag is placed within the <head> tag of your HTML document .
3. Domain Configuration
Verify that your current domain is added to the allowed domains list for your public key [(2) ]() . Public keys are restricted to specific domains for security reasons . To configure this:
- Navigate to the Public Keys section in your Retell dashboard
- Click on your public key
- Add the domain where you're testing (including localhost for local testing)
4. Agent Type
Ensure your agent is configured as a chat agent, not just a voice agent. The agent needs to support chat functionality to work with the widget [(1) ]() .
Corrected Code:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-logo-url="<https://storage.googleapis.com/msgsndr/bo4k1Or7UDEQroUoOZYZ/media/68323bd643ed4d0233f48987.png%22>
data-color="#0E76A8"
></script>
If the widget still doesn't appear after these changes, check your browser's developer console for any error messages that might provide additional clues.AI Evy
08/05/2025, 5:33 PMAI Evy
08/05/2025, 5:33 PMimmaculate_courgette_69550
08/05/2025, 5:38 PMAI Evy
08/05/2025, 5:38 PMAI Evy
08/05/2025, 5:39 PMsrc attribute is malformed. Looking at your error message, it's trying to load:
`
This indicates there are HTML encoding issues in your script tag. The correct script tag should be [(1) ]() :
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-logo-url="<https://storage.googleapis.com/msgsndr/bo4k1Or7UDEQroUoOZYZ/media/68323bd643ed4d0233f48987.png%22>
data-color="#0E76A8"
></script>
Key fixes:
1. **Clean URL**: Use `src=" without any HTML encoding or extra characters
2. **Numeric version**: Use data-agent-version="3" instead of "v3"
3. **Proper placement**: Ensure this script is in the <head> tag of your HTML
The widget should automatically handle chat sessions and persist previous chats in localStorage once properly loaded .AI Evy
08/05/2025, 5:39 PMAI Evy
08/05/2025, 5:39 PMimmaculate_courgette_69550
08/05/2025, 5:43 PMAI Evy
08/05/2025, 5:43 PMAI Evy
08/05/2025, 5:44 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-logo-url="<https://storage.googleapis.com/msgsndr/bo4k1Or7UDEQroUoOZYZ/media/68323bd643ed4d0233f48987.png%22>
data-color="#0E76A8"
></script>
Key points:
- Place this script within the <head> tag of your HTML
- The agent version should be a number (like "3") , not "v3"
- If you don't specify data-agent-version, it will use the latest version of the agent
- Make sure your domain is added to the allowed domains list for your public key [(2) ]()
After adding the widget to your website, test it by loading your website and clicking the floating button (bottom right, robot icon) [(1) ]() .AI Evy
08/05/2025, 5:44 PMAI Evy
08/05/2025, 5:44 PMimmaculate_courgette_69550
08/05/2025, 5:49 PMAI Evy
08/05/2025, 5:49 PMAI Evy
08/05/2025, 5:49 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-logo-url="<https://storage.googleapis.com/msgsndr/bo4k1Or7UDEQroUoOZYZ/media/68323bd643ed4d0233f48987.png%22>
data-color="#0E76A8"
></script>
Troubleshooting steps:
1. Verify your public key and agent ID - Make sure these are correct in your Retell dashboard
2. Check domain configuration - Ensure your domain (patient-connect.app) is added to the allowed domains list for your public key [(2) ]()
3. Agent version - You can also try removing the data-agent-version attribute entirely, as if you don't specify it, the latest version will be used [(1) ]()
4. Script placement - Place this script within the <head> tag of your HTML document
If you're still getting a 404 error, the issue might be with your public key configuration or the agent ID. Double-check these values in your Retell dashboard.AI Evy
08/05/2025, 5:49 PMAI Evy
08/05/2025, 5:49 PMimmaculate_courgette_69550
08/05/2025, 5:51 PMAI Evy
08/05/2025, 5:51 PMAI Evy
08/05/2025, 5:51 PMhtml
<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_RETELL_CHAT_AGENT_ID"
data-agent-version="YOUR_RETELL_CHAT_AGENT_VERSION"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
></script>
Replace the placeholders with your actual values:
- YOUR_RETELL_PUBLIC_KEY with your actual public key
- YOUR_RETELL_CHAT_AGENT_ID with your actual agent ID
- YOUR_RETELL_CHAT_AGENT_VERSION with your agent version (optional)
- YOUR_CUSTOM_TITLE with your preferred chat window title (optional)
- YOUR_LOGO_URL with the URL of your logo image (optional)
- YOUR_CUSTOM_COLOR with a hex color code for the widget theme (optional)
Important notes:
- Place this script within the <head> tag of your HTML
- If you don't specify data-agent-version, it will use the latest version of the agent
- Ensure your domain is added to the allowed domains list for your public key [(2) ]()
The widget will automatically handle chat sessions and persist previous chats in localStorage [(1) ]() .AI Evy
08/05/2025, 5:51 PMAI Evy
08/05/2025, 5:51 PMimmaculate_courgette_69550
08/05/2025, 5:53 PMAI Evy
08/05/2025, 5:53 PMAI Evy
08/05/2025, 5:54 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-logo-url="<https://storage.googleapis.com/msgsndr/bo4k1Or7UDEQroUoOZYZ/media/68323bd643ed4d0233f48987.png%22>
data-color="#0E76A8"
></script>
Key changes made:
- Fixed the agent version to be numeric "3" instead of "v3"
- Ensured clean URL formatting without HTML encoding issues
Before deploying, verify:
1. Your domain (patient-connect.app) is added to the allowed domains list for your public key [(2) ]()
2. The script is placed within the <head> tag of your HTML [(1) ]()
3. Your agent is configured as a chat agent, not just a voice agent
The widget will appear as a floating button in the bottom right corner with a robot icon .AI Evy
08/05/2025, 5:54 PMAI Evy
08/05/2025, 5:54 PMimmaculate_courgette_69550
08/05/2025, 5:57 PMAI Evy
08/05/2025, 5:57 PMAI Evy
08/05/2025, 5:57 PMdata-logo-url attribute is optional . Here's your script without the logo:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-color="#0E76A8"
></script>
Optional attributes you can remove if needed:
- data-logo-url (logo image)
- data-title (custom title)
- data-color (theme color)
- data-agent-version (will use latest version if omitted)
The widget will work with just the required attributes: data-public-key and data-agent-id . Removing the logo might help if there were any issues loading the external image URL.AI Evy
08/05/2025, 5:57 PMAI Evy
08/05/2025, 5:57 PMimmaculate_courgette_69550
08/05/2025, 6:00 PMAI Evy
08/05/2025, 6:00 PMAI Evy
08/05/2025, 6:00 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-color="#0E76A8"
></script>
Key fixes:
- Clean URL: `src=" without any HTML encoding
- Proper quotation marks around all attribute values
- Place this script within the <head> tag of your HTML
Before deploying, verify:
1. Your domain is added to the allowed domains list for your public key [(2) ]()
2. Your agent is configured as a chat agent (not just voice agent) [(1) ]()
3. The public key and agent ID are correct in your dashboard
The widget will appear as a floating button in the bottom right corner after loading your website .AI Evy
08/05/2025, 6:00 PMAI Evy
08/05/2025, 6:00 PMimmaculate_courgette_69550
08/05/2025, 6:05 PMAI Evy
08/05/2025, 6:05 PMAI Evy
08/05/2025, 6:05 PMhtml
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-agent-version="3"
data-title="Chat with Ema"
data-color="#0E76A8"
></script>
Key points to check:
- Make sure this script is placed within the <head> tag of your HTML
- Verify your domain is added to the allowed domains list for your public key [(2) ]()
- Ensure your agent is configured as a chat agent, not just a voice agent [(1) ]()
- If you're still having issues, try removing the data-agent-version attribute entirely - if you don't specify it, the latest version will be used
The widget should appear as a floating button (bottom right, robot icon) after loading your website .AI Evy
08/05/2025, 6:05 PMAI Evy
08/05/2025, 6:05 PMAI Evy
08/05/2025, 6:08 PMAI Evy
08/05/2025, 6:08 PMsrc attribute has incorrect formatting. Here's the corrected version:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_68d5e093baf9131a95710"
data-agent-id="agent_2db14f1161cea7f8511517444b"
data-title="Chat with Ema"
data-color="#0E76A8"
></script>
Key fix:
- Changed src="<https://dashboard.retellai.com/retell-widget.js%22>" to `src="
Important reminders:
- Place this script within the <head> tag of your HTML
- Ensure your domain is added to the allowed domains list for your public key [(2) ]()
- The widget will appear as a floating button (bottom right, robot icon) after loading your website [(1) ]()AI Evy
08/05/2025, 6:08 PMAI Evy
08/05/2025, 6:08 PMrealee_23147
08/14/2025, 1:31 PMAI Evy
08/14/2025, 1:31 PMAI Evy
08/14/2025, 1:31 PM<script> tag is missing the opening bracket after <script
2. **Malformed URL**: The src attribute has incorrect formatting with extra characters
Here's the corrected version :
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_565d973e66c98b0cb5a10"
data-agent-id="agent_af6baee8bb70a38d15fe3c31d5"
data-agent-version="0"
data-title="Ziplunch Conceierge"
data-logo-url=""
data-color="FFD92D"
></script>
Key fixes:
- Fixed the opening <script tag
- Corrected the src URL to `
- Your color code should include the # symbol: data-color="#FFD92D"
Important reminders:
- Place this script within the <head> tag of your HTML
- Ensure your domain is added to the allowed domains list for your public key [(2) ]()
- The widget will appear as a floating button (bottom right, robot icon) after loading your website [(1) ]()AI Evy
08/14/2025, 1:31 PMAI Evy
08/14/2025, 1:31 PMrealee_23147
08/14/2025, 1:35 PMAI Evy
08/14/2025, 1:35 PMAI Evy
08/14/2025, 1:35 PMsrc attribute has incorrect formatting. Here's the corrected version:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_565d973e66c98b0cb5a10"
data-agent-id="agent_af6baee8bb70a38d15fe3c31d5"
data-agent-version="0"
data-title="Ziplunch Conceierge"
data-logo-url=""
data-color="#FFD92D"
></script>
Key fix:
- Changed src="<https://dashboard.retellai.com/retell-widget.js%22> to `src="
Important reminders:
- Place this script within the <head> tag of your HTML
- The widget will automatically handle chat sessions and persist previous chats in localStorage
- After adding the widget to your website, test it by loading your website and clicking the floating button (bottom right, robot icon)AI Evy
08/14/2025, 1:35 PMAI Evy
08/14/2025, 1:35 PMrealee_23147
08/14/2025, 1:38 PMrealee_23147
08/14/2025, 1:38 PMAI Evy
08/14/2025, 1:38 PMAI Evy
08/14/2025, 1:38 PM%22 and %60) are URL encoding artifacts that shouldn't appear in your HTML script tag [(1) ]() .
The correct format should be:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="public_key_565d973e66c98b0cb5a10"
data-agent-id="agent_af6baee8bb70a38d15fe3c31d5"
data-agent-version="0"
data-title="Ziplunch Conceierge"
data-logo-url=""
data-color="#FFD92D"
></script>
What those encoded characters mean:
- %22 = URL encoding for quotation mark (")
- %60 = URL encoding for backtick (`` ` ``)
These encoded characters are appearing because your HTML is being processed incorrectly somewhere in your system. The src attribute should simply be `" without any URL encoding .
To fix this:
- Use the clean script above
- Place it within the <head> tag of your HTML
- Ensure your domain is added to the allowed domains list for your public keyAI Evy
08/14/2025, 1:38 PMAI Evy
08/14/2025, 1:38 PMrealee_23147
08/14/2025, 1:51 PM