YOUR_WIDGET_KEY with your key from the dashboard.Embed Chat Widget
Add Wiretalk to any website in under 5 minutes.
wk_…).
Standard HTML websites
Paste this snippet immediately before the closing </body> tag on every page where chat should appear.
<!-- Wiretalk Chat Widget -->
<script>
window.wiretalkConfig = {
widgetKey: 'YOUR_WIDGET_KEY',
apiBase: 'https://wiretalk.tech/api',
locale: 'en'
};
</script>
<script type="module" src="https://wiretalk.tech/build/assets/embed.js" defer></script>
Framework & CMS guides
Add the config script and module loader in your root layout. Use lazyOnload so the widget does not block page paint.
// app/layout.tsx or pages/_document.tsx
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script id="wiretalk-config" strategy="beforeInteractive">
{`window.wiretalkConfig = {
widgetKey: 'YOUR_WIDGET_KEY',
apiBase: 'https://wiretalk.tech/api',
locale: 'en'
};`}
</Script>
<Script src="https://wiretalk.tech/build/assets/embed.js" type="module" strategy="lazyOnload" />
</body>
</html>
);
}
Paste the HTML snippet in your theme footer, or use a plugin like Insert Headers and Footers.
# Appearance → Theme File Editor → footer.php (before </body>)
<!-- Wiretalk Chat Widget -->
<script>
window.wiretalkConfig = {
widgetKey: 'YOUR_WIDGET_KEY',
apiBase: 'https://wiretalk.tech/api',
locale: 'en'
};
</script>
<script type="module" src="https://wiretalk.tech/build/assets/embed.js" defer></script>
Shopify Admin → Online Store → Themes → Edit code → theme.liquid. Paste before </body>.
<!-- Wiretalk Chat Widget -->
<script>
window.wiretalkConfig = {
widgetKey: 'YOUR_WIDGET_KEY',
apiBase: 'https://wiretalk.tech/api',
locale: 'en'
};
</script>
<script type="module" src="https://wiretalk.tech/build/assets/embed.js" defer></script>
Configuration options
| Option | Required | Description |
|---|---|---|
widgetKey | Yes | Your site key from Widget Settings (wk_…). |
apiBase | Yes | Wiretalk API URL — use https://wiretalk.tech/api in production. |
locale | No | Widget language code (en, hi, etc.). Default: en. |
The script URL must point to your Wiretalk CDN: https://wiretalk.tech/build/assets/embed.js
Preview before going live
Use the built-in demo page to test your widget key without editing your production site:
https://wiretalk.tech/embed/YOUR_WIDGET_KEY
Or click Preview widget ↗ in Widget Settings inside the dashboard.
Allowed domains
For security, the widget only loads on domains you whitelist in Widget Settings → Allowed domains.
- Add
example.com(no protocol, no trailing slash) - Add
localhostfor local testing - Subdomains must be added separately unless you use a wildcard pattern supported in settings