robotshelper_99260_17584
10/27/2025, 4:18 PMAI Evy
10/27/2025, 4:18 PMAI Evy
10/27/2025, 4:19 PMUncaught SyntaxError: Unexpected token '<' error typically occurs when the script tag is not being interpreted correctly by WordPress, often due to how the theme or page builder processes HTML.
Based on the available sources, the Retell chat widget should be embedded by adding the script tag within the <head> tag of your HTML [(1) ]() . The correct embed code format is:
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>AI Evy
10/27/2025, 4:19 PM<head> tag [(1) ]() . If your theme forces footer placement, the script may load after other JavaScript executes, causing initialization issues.
Check for WordPress HTML sanitization: WordPress often strips or modifies script tags when added through certain theme customizers or page builders [(4) ]() . Consider adding the script through:
- Theme's functions.php using wp_head action hook
- A dedicated header/footer plugin
- Direct theme file editing (header.php)
Verify API key security: Ensure your API key is properly protected and not exposed in client-side code . Public keys are safe for frontend use [(2) ]() , but API keys should never be in client-side code.
The available sources don't mention a dedicated WordPress plugin for Retell widget embedding. The standard approach is using the embed script tag in the site's <head> section [(1) ]() .AI Evy
10/27/2025, 4:19 PMAI Evy
10/27/2025, 4:19 PM